Cleanup after #33396 (#33429)

Mostly formatting improvements, but also recovering a pair of parenthesis
that was accidentally removed, changing the logic.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Oriol Brufau 2024-09-12 21:23:17 +02:00 committed by GitHub
parent dc018b5f9f
commit 219a2f2038
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 58 additions and 19 deletions

View file

@ -152,8 +152,7 @@ impl LogicalVec2<LengthPercentageOrAuto<'_>> {
self.block
.non_auto()
.and_then(|value| value.maybe_to_used_value(containing_block_block_size))
.map(|value| AuOrAuto::LengthPercentage(value))
.unwrap_or(AuOrAuto::Auto)
.map_or(AuOrAuto::Auto, AuOrAuto::LengthPercentage)
},
}
}
@ -182,14 +181,12 @@ impl LogicalVec2<LengthPercentageOrAuto<'_>> {
.inline
.non_auto()
.and_then(|value| value.maybe_to_used_value(basis.inline))
.map(|value| AuOrAuto::LengthPercentage(value))
.unwrap_or(AuOrAuto::Auto),
.map_or(AuOrAuto::Auto, AuOrAuto::LengthPercentage),
block: self
.block
.non_auto()
.and_then(|value| value.maybe_to_used_value(basis.block))
.map(|value| AuOrAuto::LengthPercentage(value))
.unwrap_or(AuOrAuto::Auto),
.map_or(AuOrAuto::Auto, AuOrAuto::LengthPercentage),
}
}
}