From 886554dba5fa52379f17972636239fc3181bf9ca Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Sun, 4 Mar 2018 15:21:11 +0100 Subject: [PATCH] Derive ToCss for DeclaredValue --- components/style/properties/properties.mako.rs | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs index ff6dd747d82..595a9078141 100644 --- a/components/style/properties/properties.mako.rs +++ b/components/style/properties/properties.mako.rs @@ -1308,7 +1308,7 @@ impl ShorthandId { /// Servo's representation of a declared value for a given `T`, which is the /// declared value for that property. -#[derive(Clone, Debug, Eq, PartialEq)] +#[derive(Clone, Debug, Eq, PartialEq, ToCss)] pub enum DeclaredValue<'a, T: 'a> { /// A known specified value from the stylesheet. Value(&'a T), @@ -1438,19 +1438,6 @@ impl UnparsedValue { } } -impl<'a, T: ToCss> ToCss for DeclaredValue<'a, T> { - fn to_css(&self, dest: &mut CssWriter) -> fmt::Result - where - W: Write, - { - match *self { - DeclaredValue::Value(ref inner) => inner.to_css(dest), - DeclaredValue::WithVariables(ref with_variables) => with_variables.to_css(dest), - DeclaredValue::CSSWideKeyword(ref keyword) => keyword.to_css(dest), - } - } -} - /// An identifier for a given property declaration, which can be either a /// longhand or a custom property. #[derive(Clone, Copy, PartialEq)]