From 5c5da8f075d21a2606cb5cc78f85c901c4aeb010 Mon Sep 17 00:00:00 2001 From: lpy Date: Mon, 10 Mar 2014 16:22:56 +0800 Subject: [PATCH] Replace explicit match with as_ref().(fixes #1870) --- src/components/main/css/matching.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/components/main/css/matching.rs b/src/components/main/css/matching.rs index 0dd4299e5d4..eda145f48fb 100644 --- a/src/components/main/css/matching.rs +++ b/src/components/main/css/matching.rs @@ -420,10 +420,7 @@ impl<'ln> MatchMethods for LayoutNode<'ln> { applicable_declarations: &mut ApplicableDeclarations, shareable: &mut bool) { let style_attribute = self.with_element(|element| { - match *element.style_attribute() { - None => None, - Some(ref style_attribute) => Some(style_attribute) - } + element.style_attribute().as_ref() }); applicable_declarations.normal_shareable =