mirror of
https://github.com/servo/servo.git
synced 2025-07-07 23:43:39 +01:00
replace match with if-let
This commit is contained in:
parent
6b28a18f45
commit
27b60135be
1 changed files with 4 additions and 7 deletions
|
@ -1802,13 +1802,10 @@ pub fn apply_declarations<'a, F, I>(viewport_size: Size2D<Au>,
|
|||
let mut custom_properties = None;
|
||||
let mut seen_custom = HashSet::new();
|
||||
for declaration in iter_declarations() {
|
||||
match *declaration {
|
||||
PropertyDeclaration::Custom(ref name, ref value) => {
|
||||
::custom_properties::cascade(
|
||||
&mut custom_properties, &inherited_custom_properties,
|
||||
&mut seen_custom, name, value)
|
||||
}
|
||||
_ => {}
|
||||
if let PropertyDeclaration::Custom(ref name, ref value) = *declaration {
|
||||
::custom_properties::cascade(
|
||||
&mut custom_properties, &inherited_custom_properties,
|
||||
&mut seen_custom, name, value)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue