diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2017-08-22 15:30:43 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2017-08-22 19:12:42 +0200 |
commit | faaf31411a0a67f6acc3b6d463474f2ac92990f7 (patch) | |
tree | a3a202667d6b0d2f59add537811a0ec8afddfb3b /components/style/macros.rs | |
parent | 8ca9542de6838fc485e9e41013d84b396ff216a9 (diff) | |
download | servo-faaf31411a0a67f6acc3b6d463474f2ac92990f7.tar.gz servo-faaf31411a0a67f6acc3b6d463474f2ac92990f7.zip |
Derive the most trivial ToAnimatedZero impls
Diffstat (limited to 'components/style/macros.rs')
-rw-r--r-- | components/style/macros.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/components/style/macros.rs b/components/style/macros.rs index b4a27415162..e07aa8f99ab 100644 --- a/components/style/macros.rs +++ b/components/style/macros.rs @@ -84,7 +84,7 @@ macro_rules! define_keyword_type { ($name: ident, $css: expr) => { #[allow(missing_docs)] #[cfg_attr(feature = "servo", derive(HeapSizeOf))] - #[derive(Clone, ComputeSquaredDistance, Copy, PartialEq, ToCss)] + #[derive(Clone, ComputeSquaredDistance, Copy, PartialEq, ToAnimatedZero, ToCss)] pub struct $name; impl $crate::values::animated::Animate for $name { @@ -115,10 +115,5 @@ macro_rules! define_keyword_type { impl $crate::values::computed::ComputedValueAsSpecified for $name {} impl $crate::values::animated::AnimatedValueAsComputed for $name {} no_viewport_percentage!($name); - - impl $crate::values::animated::ToAnimatedZero for $name { - #[inline] - fn to_animated_zero(&self) -> Result<Self, ()> { Ok($name) } - } }; } |