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.