diff --git a/components/style/custom_properties.rs b/components/style/custom_properties.rs index d5920a6533f..5b7c125739a 100644 --- a/components/style/custom_properties.rs +++ b/components/style/custom_properties.rs @@ -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, @@ -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 {