From 27b60135be714bc7d60beba2ee4095ef51645df9 Mon Sep 17 00:00:00 2001 From: Jyotsna Prakash Date: Sun, 5 Mar 2017 17:49:47 -0800 Subject: [PATCH] replace match with if-let --- components/style/properties/properties.mako.rs | 11 ++++------- 1 file 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, 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) } }