From 20b5e3a1d63b3e8e7b95c0532c49a9b748cec5a9 Mon Sep 17 00:00:00 2001 From: mitchmindtree Date: Sun, 3 Jul 2016 21:54:05 +1000 Subject: [PATCH 1/3] Move bezier_pt function outside of bezier interpolation function to avoid rustc ICE 34027. --- src/interpolate.rs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/interpolate.rs b/src/interpolate.rs index 031abd4..d0aa97e 100644 --- a/src/interpolate.rs +++ b/src/interpolate.rs @@ -77,6 +77,14 @@ pub fn ease

(x: P::X, start: &P, end: &P, ease_fn: EaseFunction) -> P::Y } +/// Get bezier point for bezier curve. +#[inline] +fn bezier_pt(n1: T, n2: T, perc: T) -> T + where T: Scalar +{ + (n2 - n1.clone()) * perc + n1 +} + /// Interpolate between the given start and end points given some bezier curve. #[inline] pub fn bezier

(x: P::X, start: &P, end: &P, curve: ::Scalar) -> P::Y @@ -85,15 +93,6 @@ pub fn bezier

(x: P::X, start: &P, end: &P, curve: ::Scalar) ::Scalar: Scalar + NumCast, { maybe_exact_point(&x, start, end).unwrap_or_else(|| { - - /// Get bezier point for bezier curve. - #[inline] - fn bezier_pt(n1: T, n2: T, perc: T) -> T - where T: Scalar - { - (n2 - n1.clone()) * perc + n1 - } - let x = P::x_to_scalar(x.clone()); let start_x = P::x_to_scalar(start.x()); let end_x = P::x_to_scalar(end.x()); From a9ea667da004239f630536219d803b163b230944 Mon Sep 17 00:00:00 2001 From: mitchmindtree Date: Sun, 3 Jul 2016 21:56:48 +1000 Subject: [PATCH 2/3] Bump tiny version to publish rustc ICE dodge. --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index d43b11e..0032750 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "envelope" description = "An interpolatable Envelope trait along with a generic 2D Point trait. Useful for controlling parameters over time." -version = "0.8.0" +version = "0.8.1" authors = ["mitchmindtree "] readme = "README.md" keywords = ["interpolate", "dsp", "audio", "time", "2D"] From 5faa59905a80955db1fe2bb24ce3a71a6ad560f8 Mon Sep 17 00:00:00 2001 From: mitchmindtree Date: Sun, 3 Jul 2016 21:58:28 +1000 Subject: [PATCH 3/3] Have travis test on beta. Ensure that travis also tests serde_serialization feature. --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 3701d1c..ee292cb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,7 @@ language: rust rust: - nightly + - beta - stable os: @@ -11,4 +12,5 @@ os: script: - cargo build --verbose - cargo test --verbose + - cargo test --features="serde_serialization" --verbose - cargo doc --verbose