From dc1e5372da285d3d7379b281969adaebae6f5350 Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Thu, 20 Jul 2017 10:30:44 +0200 Subject: [PATCH] Derive ToCss for SVGPaint I wonder if there wasn't a bug in the former implementation, given there is no space written before the fallback value. --- components/style/values/generics/mod.rs | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/components/style/values/generics/mod.rs b/components/style/values/generics/mod.rs index 0ffe5e10629..d93ea570a71 100644 --- a/components/style/values/generics/mod.rs +++ b/components/style/values/generics/mod.rs @@ -255,7 +255,7 @@ impl ToCss for FontSettingTagFloat { /// /// https://www.w3.org/TR/SVG2/painting.html#SpecifyingPaint #[cfg_attr(feature = "servo", derive(HeapSizeOf))] -#[derive(Clone, Debug, PartialEq, ToAnimatedValue, ToComputedValue)] +#[derive(Clone, Debug, PartialEq, ToAnimatedValue, ToComputedValue, ToCss)] pub struct SVGPaint { /// The paint source pub kind: SVGPaintKind, @@ -336,15 +336,3 @@ impl Parse for SVGPaint { } } } - -impl ToCss for SVGPaint { - fn to_css(&self, dest: &mut W) -> fmt::Result where W: fmt::Write { - self.kind.to_css(dest)?; - if let Some(ref fallback) = self.fallback { - fallback.to_css(dest)?; - } - Ok(()) - } -} - -