From df07ebde9949560e180fed431ffbeefbd8ef2000 Mon Sep 17 00:00:00 2001 From: Boris Chiou Date: Mon, 9 Oct 2017 11:28:16 +0800 Subject: [PATCH] Use default Debug trait for AnimationValue. We use AnimationValue for animation backend to do interpolation, accumulation, or computing distance. While debugging it, dumping the property name is not enough. We need to dump the detailed value contained in it. --- .../style/properties/helpers/animated_properties.mako.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/components/style/properties/helpers/animated_properties.mako.rs b/components/style/properties/helpers/animated_properties.mako.rs index c3a272239ed..5bf10a8b3dc 100644 --- a/components/style/properties/helpers/animated_properties.mako.rs +++ b/components/style/properties/helpers/animated_properties.mako.rs @@ -337,7 +337,7 @@ unsafe impl HasSimpleFFI for AnimationValueMap {} /// /// FIXME: We need to add a path for custom properties, but that's trivial after /// this (is a similar path to that of PropertyDeclaration). -#[derive(Clone, PartialEq)] +#[derive(Clone, Debug, PartialEq)] #[cfg_attr(feature = "servo", derive(HeapSizeOf))] pub enum AnimationValue { % for prop in data.longhands: @@ -352,12 +352,6 @@ pub enum AnimationValue { % endfor } -impl fmt::Debug for AnimationValue { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str(self.id().name()) - } -} - impl AnimationValue { /// Returns the longhand id this animated value corresponds to. pub fn id(&self) -> LonghandId {