mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
clippy: Fix manual_map warnings (#31922)
This commit is contained in:
parent
5d518ca8dc
commit
7349ce5b6a
8 changed files with 34 additions and 51 deletions
|
@ -130,11 +130,8 @@ fn convert_culong(js: &ConstrainULong) -> Option<Constrain<u32>> {
|
|||
max: range.parent.max,
|
||||
ideal: range.ideal,
|
||||
}))
|
||||
} else if let Some(exact) = range.exact {
|
||||
Some(Constrain::Value(exact))
|
||||
} else {
|
||||
// the unspecified case is treated as all three being none
|
||||
None
|
||||
range.exact.map(Constrain::Value)
|
||||
}
|
||||
},
|
||||
}
|
||||
|
@ -150,11 +147,8 @@ fn convert_cdouble(js: &ConstrainDouble) -> Option<Constrain<f64>> {
|
|||
max: range.parent.max.map(|x| *x),
|
||||
ideal: range.ideal.map(|x| *x),
|
||||
}))
|
||||
} else if let Some(exact) = range.exact {
|
||||
Some(Constrain::Value(*exact))
|
||||
} else {
|
||||
// the unspecified case is treated as all three being none
|
||||
None
|
||||
range.exact.map(|exact| Constrain::Value(*exact))
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue