Auto merge of #13093 - ashrko619:cache-element-classnames, r=nox

Remove unneeded clone in the style system cache

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #13089  (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13093)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-08-28 05:55:56 -05:00 committed by GitHub
commit db52d8a815

View file

@ -388,7 +388,7 @@ fn have_same_class<E: TElement>(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.