mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Address review comments
This commit is contained in:
parent
704d7a01c9
commit
f51b115db0
4 changed files with 15 additions and 13 deletions
|
@ -14,7 +14,7 @@ impl From<CalcLengthOrPercentage> for nsStyleCoord_CalcValue {
|
|||
fn from(other: CalcLengthOrPercentage) -> nsStyleCoord_CalcValue {
|
||||
let has_percentage = other.percentage.is_some();
|
||||
nsStyleCoord_CalcValue {
|
||||
mLength: other.length.map(|l| l.0).unwrap_or(0),
|
||||
mLength: other.length.map_or(0, |l| l.0),
|
||||
mPercent: other.percentage.unwrap_or(0.0),
|
||||
mHasPercent: has_percentage,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue