Derive the most trivial ToAnimatedZero impls

This commit is contained in:
Anthony Ramine 2017-08-22 15:30:43 +02:00
parent 8ca9542de6
commit faaf31411a
15 changed files with 112 additions and 174 deletions

View file

@ -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) }
}
};
}