diff options
author | Jyotsna Prakash <jyotsna.prakash@gmail.com> | 2017-03-05 17:49:47 -0800 |
---|---|---|
committer | Jyotsna Prakash <jyotsna.prakash@gmail.com> | 2017-03-05 17:52:39 -0800 |
commit | 27b60135be714bc7d60beba2ee4095ef51645df9 (patch) | |
tree | 358f5b89faa0104b71d5ba745e54eb3feef67fcd | |
parent | 6b28a18f45199cfd80a949178af810001fcb83e0 (diff) | |
download | servo-27b60135be714bc7d60beba2ee4095ef51645df9.tar.gz servo-27b60135be714bc7d60beba2ee4095ef51645df9.zip |
replace match with if-let
-rw-r--r-- | components/style/properties/properties.mako.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs index 4a7efc2755c..8b9ab40a4dc 100644 --- a/components/style/properties/properties.mako.rs +++ b/components/style/properties/properties.mako.rs @@ -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) } } |