mirror of
https://github.com/servo/servo.git
synced 2025-07-08 07:53:40 +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,14 +1802,11 @@ pub fn apply_declarations<'a, F, I>(viewport_size: Size2D<Au>,
|
||||||
let mut custom_properties = None;
|
let mut custom_properties = None;
|
||||||
let mut seen_custom = HashSet::new();
|
let mut seen_custom = HashSet::new();
|
||||||
for declaration in iter_declarations() {
|
for declaration in iter_declarations() {
|
||||||
match *declaration {
|
if let PropertyDeclaration::Custom(ref name, ref value) = *declaration {
|
||||||
PropertyDeclaration::Custom(ref name, ref value) => {
|
|
||||||
::custom_properties::cascade(
|
::custom_properties::cascade(
|
||||||
&mut custom_properties, &inherited_custom_properties,
|
&mut custom_properties, &inherited_custom_properties,
|
||||||
&mut seen_custom, name, value)
|
&mut seen_custom, name, value)
|
||||||
}
|
}
|
||||||
_ => {}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let custom_properties =
|
let custom_properties =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue