Implement From<Option<T>> for Element
This commit is contained in:
parent
dcea10f707
commit
e0d9078334
9 changed files with 110 additions and 74 deletions
|
|
@ -57,6 +57,7 @@ impl Length {
|
|||
|
||||
/// Adapts the [`Length`] so it can contain the other [`Length`] and
|
||||
/// match its fluidity.
|
||||
#[inline]
|
||||
pub fn enclose(self, other: Length) -> Self {
|
||||
match (self, other) {
|
||||
(Length::Shrink, Length::Fill | Length::FillPortion(_)) => other,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue