aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2018-03-31 00:53:47 +0200
committerEmilio Cobos Álvarez <emilio@crisal.io>2018-03-31 00:53:47 +0200
commitec0c4f396a66b45deafc4fad2edb470793f87a3d (patch)
treec8014bbb48906a8c2078746ae48eb0c86598bb0a
parentd232705106478e0a2e5de78f8b40144408879c36 (diff)
downloadservo-ec0c4f396a66b45deafc4fad2edb470793f87a3d.tar.gz
servo-ec0c4f396a66b45deafc4fad2edb470793f87a3d.zip
style: Derive a debug impl instead of implementing by hand.
-rw-r--r--components/style/values/generics/image.rs14
1 files changed, 1 insertions, 13 deletions
diff --git a/components/style/values/generics/image.rs b/components/style/values/generics/image.rs
index ca041d5ed9d..e5e725ebe05 100644
--- a/components/style/values/generics/image.rs
+++ b/components/style/values/generics/image.rs
@@ -120,7 +120,7 @@ pub enum GradientItem<Color, LengthOrPercentage> {
/// A color stop.
/// <https://drafts.csswg.org/css-images/#typedef-color-stop-list>
-#[derive(Clone, Copy, MallocSizeOf, PartialEq, ToComputedValue, ToCss)]
+#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, ToComputedValue, ToCss)]
pub struct ColorStop<Color, LengthOrPercentage> {
/// The color of this stop.
pub color: Color,
@@ -310,15 +310,3 @@ where
}
}
}
-
-impl<C, L> fmt::Debug for ColorStop<C, L>
- where C: fmt::Debug, L: fmt::Debug,
-{
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- write!(f, "{:?}", self.color)?;
- if let Some(ref pos) = self.position {
- write!(f, " {:?}", pos)?;
- }
- Ok(())
- }
-}