diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-07-19 01:56:05 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-19 01:56:05 -0700 |
commit | d76d0978911e4823d9d40f7ed161de24f3cc7f61 (patch) | |
tree | bc6934d57fc9d893b7a89f0d26d3076d4339aeb6 /components/style/properties/helpers.mako.rs | |
parent | 8e73bc5b471d92331d9308821caed62bd30a231f (diff) | |
parent | 98bf8321693645c8eb14aa39989b8e97ef438f0d (diff) | |
download | servo-d76d0978911e4823d9d40f7ed161de24f3cc7f61.tar.gz servo-d76d0978911e4823d9d40f7ed161de24f3cc7f61.zip |
Auto merge of #17774 - servo:derive-all-the-things, r=emilio
Prepare some code for future derivation π
<!-- Reviewable:start -->
This change isβ[<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17774)
<!-- Reviewable:end -->
Diffstat (limited to 'components/style/properties/helpers.mako.rs')
-rw-r--r-- | components/style/properties/helpers.mako.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/components/style/properties/helpers.mako.rs b/components/style/properties/helpers.mako.rs index e59be799737..0517b824faa 100644 --- a/components/style/properties/helpers.mako.rs +++ b/components/style/properties/helpers.mako.rs @@ -129,6 +129,8 @@ % if animation_value_type == "ComputedValue": use properties::animated_properties::Animatable; + use values::animated::ToAnimatedZero; + impl Animatable for T { fn add_weighted(&self, other: &Self, self_portion: f64, other_portion: f64) -> Result<Self, ()> { @@ -149,6 +151,11 @@ self.0.compute_squared_distance(&other.0) } } + + impl ToAnimatedZero for T { + #[inline] + fn to_animated_zero(&self) -> Result<Self, ()> { Err(()) } + } % endif pub type Iter<'a, 'cx, 'cx_a> = ComputedVecIter<'a, 'cx, 'cx_a, super::single_value::SpecifiedValue>; |