Derive Eq and PartialEq for CustomPropertiesMap

This commit is contained in:
Fernando Jiménez Moreno 2017-06-28 19:50:29 -07:00
parent b3e2b26a23
commit 0335c09810

View file

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