Derive the most trivial Animate impls

This commit is contained in:
Anthony Ramine 2017-08-22 18:45:30 +02:00
parent faaf31411a
commit 7ee124b1ed
20 changed files with 168 additions and 314 deletions

View file

@ -139,6 +139,7 @@ impl ToAnimatedValue for ComputedTextShadowList {
}
}
// FIXME(nox): This could be derived if we implement Animate for bool.
impl Animate for BoxShadow {
#[inline]
fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> {
@ -211,15 +212,3 @@ impl ToAnimatedZero for FilterList {
Ok(FilterList(vec![]))
}
}
impl Animate for SimpleShadow {
#[inline]
fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> {
Ok(SimpleShadow {
color: self.color.animate(&other.color, procedure)?,
horizontal: self.horizontal.animate(&other.horizontal, procedure)?,
vertical: self.vertical.animate(&other.vertical, procedure)?,
blur: self.blur.animate(&other.blur, procedure)?,
})
}
}