From 84eab314c9e748cd49143619ad11998ea5162007 Mon Sep 17 00:00:00 2001 From: Ashwin R Date: Sun, 28 Aug 2016 16:06:23 +0530 Subject: [PATCH] Removed unneeded clone in the style system cache --- components/style/matching.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/style/matching.rs b/components/style/matching.rs index 9dc468098b1..ca040c9670b 100644 --- a/components/style/matching.rs +++ b/components/style/matching.rs @@ -388,7 +388,7 @@ fn have_same_class(element: &E, candidate.class_attributes = Some(attrs) } - element_class_attributes == candidate.class_attributes.clone().unwrap() + element_class_attributes == *candidate.class_attributes.as_ref().unwrap() } // TODO: These re-match the candidate every time, which is suboptimal.