mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Rustfmt recent changes.
This commit is contained in:
parent
c7f30ad0df
commit
2a6cdaa30a
22 changed files with 141 additions and 172 deletions
|
@ -481,7 +481,6 @@ impl MaybeAuto {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
#[inline]
|
||||
pub fn map<F>(&self, mapper: F) -> MaybeAuto
|
||||
where
|
||||
|
@ -497,15 +496,12 @@ impl MaybeAuto {
|
|||
/// Receive an optional container size and return used value for width or height.
|
||||
///
|
||||
/// `style_length`: content size as given in the CSS.
|
||||
pub fn style_length(
|
||||
style_length: LengthPercentageOrAuto,
|
||||
container_size: Option<Au>,
|
||||
) -> MaybeAuto {
|
||||
pub fn style_length(style_length: LengthPercentageOrAuto, container_size: Option<Au>) -> MaybeAuto {
|
||||
match style_length {
|
||||
LengthPercentageOrAuto::Auto => MaybeAuto::Auto,
|
||||
LengthPercentageOrAuto::LengthPercentage(ref lp) => {
|
||||
MaybeAuto::from_option(lp.maybe_to_used_value(container_size))
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -574,8 +570,9 @@ impl SizeConstraint {
|
|||
max_size: LengthPercentageOrNone,
|
||||
border: Option<Au>,
|
||||
) -> SizeConstraint {
|
||||
let mut min_size =
|
||||
min_size.maybe_to_used_value(container_size).unwrap_or(Au(0));
|
||||
let mut min_size = min_size
|
||||
.maybe_to_used_value(container_size)
|
||||
.unwrap_or(Au(0));
|
||||
|
||||
let mut max_size = match max_size {
|
||||
LengthPercentageOrNone::None => None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue