Auto merge of #17558 - ferjm:custompropmap.eq, r=emilio

Derive Eq and PartialEq for CustomPropertiesMap

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

<!-- 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/17558)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-06-28 22:01:17 -07:00 committed by GitHub
commit 2ff781d068

View file

@ -97,7 +97,7 @@ impl ToCss for ComputedValue {
/// DOM. CSSDeclarations expose property names as indexed properties, which
/// need to be stable. So we keep an array of property names which order is
/// determined on the order that they are added to the name-value map.
#[derive(Clone, Debug)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct CustomPropertiesMap {
/// Custom property name index.
index: Vec<Name>,
@ -145,13 +145,6 @@ impl CustomPropertiesMap {
}
}
impl Eq for CustomPropertiesMap {}
impl PartialEq for CustomPropertiesMap {
fn eq(&self, other: &CustomPropertiesMap) -> bool {
self.values == other.values && self.index == other.index
}
}
impl ComputedValue {
fn empty() -> ComputedValue {
ComputedValue {