diff --git a/.travis.yml b/.travis.yml index 6a7159d..dec23a8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,13 +14,17 @@ # limitations under the License. language: rust + +rust: + - 1.0.0-beta.4 + - nightly + env: global: - secure: S0l5RmsFJgbDdzXjHsCluexb1R9RklpxZMJgr9RcieeqSqaJDPUht53yBZDyuk04/KzEbtM5yxogJd2tcv2E4EogPLL8oG77GItNc/i6jy4TLUjU28WKOMiBvYA/1rhb7f/DEQgj7DtIHP/rQGKH8goUdJfqGbk7EawP7FSxC2Y= script: - cargo build - cargo test - - cargo bench - cargo doc after_script: # the doc directory needs to be in the root for rust-ci diff --git a/src/angle.rs b/src/angle.rs index 70f30c8..e3a84b8 100644 --- a/src/angle.rs +++ b/src/angle.rs @@ -276,10 +276,11 @@ impl One for Deg { fn one() -> Deg { deg(one()) } } +const PI_2: f64 = f64::consts::PI * 2f64; impl Angle for Rad { #[inline] fn from>(theta: A) -> Rad { theta.to_rad() } - #[inline] fn full_turn() -> Rad { rad(cast(f64::consts::PI_2).unwrap()) } + #[inline] fn full_turn() -> Rad { rad(cast(PI_2).unwrap()) } } impl diff --git a/src/lib.rs b/src/lib.rs index 4d2fcbd..261d681 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -15,7 +15,6 @@ #![crate_type = "rlib"] #![crate_type = "dylib"] -#![feature(plugin, core, custom_derive)] //! Computer graphics-centric math. //! diff --git a/src/rotation.rs b/src/rotation.rs index d2335dc..cf3e689 100644 --- a/src/rotation.rs +++ b/src/rotation.rs @@ -133,7 +133,6 @@ pub trait Rotation3: Rotation, Point3> /// matrix: /// /// ```no_run -/// #![feature(core)] /// use cgmath::rad; /// use cgmath::Vector2; /// use cgmath::{Matrix, ToMatrix2}; diff --git a/src/transform.rs b/src/transform.rs index fc41c1e..9e09f12 100644 --- a/src/transform.rs +++ b/src/transform.rs @@ -237,7 +237,7 @@ impl Transform3 for AffineMatrix3 {} /// A trait that allows extracting components (rotation, translation, scale) /// from an arbitrary transformations -pub trait ToComponents, P: Point, R: Rotation> { +pub trait ToComponents, P: Point, R: Rotation> { /// Extract the (scale, rotation, translation) triple fn decompose(&self) -> (V, R, V); }