diff --git a/components/style/piecewise_linear.rs b/components/style/piecewise_linear.rs index f833d6350ea..acc064fdbcc 100644 --- a/components/style/piecewise_linear.rs +++ b/components/style/piecewise_linear.rs @@ -26,7 +26,7 @@ pub struct PiecewiseLinearFunction { } /// Parameters to define one linear stop. -pub type PiecewiseLinearFunctionBuildParameters = (CSSFloat, Option, Option); +pub type PiecewiseLinearFunctionBuildParameters = (CSSFloat, Option); impl PiecewiseLinearFunction { /// Interpolate y value given x and two points. The linear function will be rooted at the asymptote. @@ -97,8 +97,8 @@ impl PiecewiseLinearFunction { Iter: Iterator + ExactSizeIterator, { let mut builder = PiecewiseLinearFunctionBuilder::with_capacity(iter.len()); - for (y, x_start, x_end) in iter { - builder = builder.push(y, x_start, x_end); + for (y, x_start) in iter { + builder = builder.push(y, x_start); } builder.build() } @@ -161,11 +161,8 @@ impl PiecewiseLinearFunctionBuilder { /// the x value is calculated later. If the end x value is specified, a flat segment /// is generated. If start x value is not specified but end x is, it is treated as /// start x. - pub fn push(mut self, y: CSSFloat, x_start: Option, x_end: Option) -> Self { + pub fn push(mut self, y: CSSFloat, x_start: Option) -> Self { self.create_entry(y, x_start); - if x_end.is_some() { - self.create_entry(y, x_end.map(|x| x)); - } self } diff --git a/components/style/values/computed/easing.rs b/components/style/values/computed/easing.rs index c75767c13e6..3a1a77a3575 100644 --- a/components/style/values/computed/easing.rs +++ b/components/style/values/computed/easing.rs @@ -25,7 +25,6 @@ impl ComputedLinearStop { ( x.output, x.input.into_rust().map(|x| x.0), - None, ) } }