mirror of
https://github.com/servo/servo.git
synced 2025-08-08 23:15:33 +01:00
Derive the most trivial ToAnimatedZero impls
This commit is contained in:
parent
8ca9542de6
commit
faaf31411a
15 changed files with 112 additions and 174 deletions
|
@ -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) }
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue