From 5066d6b9de108f4ee2e840bb914e17ef5acff953 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Crozet?= Date: Tue, 3 Jun 2014 22:37:46 +0200 Subject: [PATCH] Update to the last rust-nightly. Version of rustc: 0.11.0-pre-nightly (918dbfe 2014-06-02 20:51:30 -0700). --- src/na.rs | 4 ++-- src/structs/dmat.rs | 2 +- src/structs/dvec.rs | 2 +- src/structs/iso.rs | 6 +++--- src/structs/mat.rs | 14 +++++++------- src/structs/rot.rs | 6 +++--- src/structs/vec.rs | 14 +++++++------- src/structs/vec_macros.rs | 4 ++-- src/traits/operations.rs | 2 +- 9 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/na.rs b/src/na.rs index 00088eff..a5702e49 100644 --- a/src/na.rs +++ b/src/na.rs @@ -105,13 +105,13 @@ pub fn clamp(val: T, min: T, max: T) -> T { /// Same as `cmp::max`. #[inline(always)] -pub fn max(a: T, b: T) -> T { +pub fn max(a: T, b: T) -> T { cmp::max(a, b) } /// Same as `cmp::min`. #[inline(always)] -pub fn min(a: T, b: T) -> T { +pub fn min(a: T, b: T) -> T { cmp::min(a, b) } diff --git a/src/structs/dmat.rs b/src/structs/dmat.rs index b03e62bd..8233384b 100644 --- a/src/structs/dmat.rs +++ b/src/structs/dmat.rs @@ -14,7 +14,7 @@ use std::fmt::{Show, Formatter, Result}; /// Matrix with dimensions unknown at compile-time. -#[deriving(TotalEq, PartialEq, Clone)] +#[deriving(Eq, PartialEq, Clone)] pub struct DMat { nrows: uint, ncols: uint, diff --git a/src/structs/dvec.rs b/src/structs/dvec.rs index 2b637c4c..372a8cdd 100644 --- a/src/structs/dvec.rs +++ b/src/structs/dvec.rs @@ -12,7 +12,7 @@ use traits::geometry::{Dot, Norm}; use traits::structure::{Iterable, IterableMut, Indexable}; /// Vector with a dimension unknown at compile-time. -#[deriving(TotalEq, PartialEq, Show, Clone)] +#[deriving(Eq, PartialEq, Show, Clone)] pub struct DVec { /// Components of the vector. Contains as much elements as the vector dimension. pub at: Vec diff --git a/src/structs/iso.rs b/src/structs/iso.rs index 98e97610..942ea053 100644 --- a/src/structs/iso.rs +++ b/src/structs/iso.rs @@ -18,7 +18,7 @@ use structs::rot::{Rot2, Rot3, Rot4}; /// /// This is the composition of a rotation followed by a translation. /// Isometries conserve angles and distances, hence do not allow shearing nor scaling. -#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Show)] +#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Show)] pub struct Iso2 { /// The rotation applicable by this isometry. pub rotation: Rot2, @@ -30,7 +30,7 @@ pub struct Iso2 { /// /// This is the composition of a rotation followed by a translation. /// Isometries conserve angles and distances, hence do not allow shearing nor scaling. -#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Show)] +#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Show)] pub struct Iso3 { /// The rotation applicable by this isometry. pub rotation: Rot3, @@ -41,7 +41,7 @@ pub struct Iso3 { /// Four dimensional isometry. /// /// Isometries conserve angles and distances, hence do not allow shearing nor scaling. -#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Show)] +#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Show)] pub struct Iso4 { /// The rotation applicable by this isometry. pub rotation: Rot4, diff --git a/src/structs/mat.rs b/src/structs/mat.rs index a9cacf66..248e18eb 100644 --- a/src/structs/mat.rs +++ b/src/structs/mat.rs @@ -17,7 +17,7 @@ use traits::geometry::{ToHomogeneous, FromHomogeneous}; /// Special identity matrix. All its operation are no-ops. -#[deriving(TotalEq, PartialEq, Decodable, Clone, Rand, Show)] +#[deriving(Eq, PartialEq, Decodable, Clone, Rand, Show)] pub struct Identity; impl Identity { @@ -29,7 +29,7 @@ impl Identity { } /// Square matrix of dimension 1. -#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)] +#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)] pub struct Mat1 { pub m11: N } @@ -125,7 +125,7 @@ from_homogeneous_impl!(Mat1, Mat2, 1, 2) outer_impl!(Vec1, Mat1) /// Square matrix of dimension 2. -#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)] +#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)] pub struct Mat2 { pub m11: N, pub m21: N, pub m12: N, pub m22: N @@ -226,7 +226,7 @@ from_homogeneous_impl!(Mat2, Mat3, 2, 3) outer_impl!(Vec2, Mat2) /// Square matrix of dimension 3. -#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)] +#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)] pub struct Mat3 { pub m11: N, pub m21: N, pub m31: N, pub m12: N, pub m22: N, pub m32: N, @@ -341,7 +341,7 @@ from_homogeneous_impl!(Mat3, Mat4, 3, 4) outer_impl!(Vec3, Mat3) /// Square matrix of dimension 4. -#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)] +#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)] pub struct Mat4 { pub m11: N, pub m21: N, pub m31: N, pub m41: N, pub m12: N, pub m22: N, pub m32: N, pub m42: N, @@ -508,7 +508,7 @@ from_homogeneous_impl!(Mat4, Mat5, 4, 5) outer_impl!(Vec4, Mat4) /// Square matrix of dimension 5. -#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)] +#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)] pub struct Mat5 { pub m11: N, pub m21: N, pub m31: N, pub m41: N, pub m51: N, pub m12: N, pub m22: N, pub m32: N, pub m42: N, pub m52: N, @@ -691,7 +691,7 @@ from_homogeneous_impl!(Mat5, Mat6, 5, 6) outer_impl!(Vec5, Mat5) /// Square matrix of dimension 6. -#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)] +#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)] pub struct Mat6 { pub m11: N, pub m21: N, pub m31: N, pub m41: N, pub m51: N, pub m61: N, pub m12: N, pub m22: N, pub m32: N, pub m42: N, pub m52: N, pub m62: N, diff --git a/src/structs/rot.rs b/src/structs/rot.rs index f2c56624..7c9b17ec 100644 --- a/src/structs/rot.rs +++ b/src/structs/rot.rs @@ -13,7 +13,7 @@ use structs::mat::{Mat2, Mat3, Mat4, Mat5}; /// Two dimensional rotation matrix. -#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Show, Hash)] +#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Show, Hash)] pub struct Rot2 { submat: Mat2 } @@ -91,7 +91,7 @@ impl AbsoluteRotate> for Rot2 { * 3d rotation */ /// Three dimensional rotation matrix. -#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Show, Hash)] +#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Show, Hash)] pub struct Rot3 { submat: Mat3 } @@ -262,7 +262,7 @@ impl AbsoluteRotate> for Rot3 { } /// Four dimensional rotation matrix. -#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Show, Hash)] +#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Show, Hash)] pub struct Rot4 { submat: Mat4 } diff --git a/src/structs/vec.rs b/src/structs/vec.rs index 7ad3d2eb..56bc1678 100644 --- a/src/structs/vec.rs +++ b/src/structs/vec.rs @@ -14,11 +14,11 @@ use traits::structure::{Basis, Cast, Dim, Indexable, Iterable, IterableMut}; /// Vector of dimension 0. -#[deriving(TotalEq, PartialEq, Decodable, Clone, Rand, Zero, Show)] +#[deriving(Eq, PartialEq, Decodable, Clone, Rand, Zero, Show)] pub struct Vec0; /// Vector of dimension 1. -#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)] +#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)] pub struct Vec1 { /// First component of the vector. pub x: N @@ -113,7 +113,7 @@ rotate_impl!(Vec1) transform_impl!(Vec1) /// Vector of dimension 2. -#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)] +#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)] pub struct Vec2 { /// First component of the vector. pub x: N, @@ -210,7 +210,7 @@ rotate_impl!(Vec2) transform_impl!(Vec2) /// Vector of dimension 3. -#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)] +#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)] pub struct Vec3 { /// First component of the vector. pub x: N, @@ -313,7 +313,7 @@ transform_impl!(Vec3) /// Vector of dimension 4. -#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)] +#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)] pub struct Vec4 { /// First component of the vector. pub x: N, @@ -414,7 +414,7 @@ rotate_impl!(Vec4) transform_impl!(Vec4) /// Vector of dimension 5. -#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)] +#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)] pub struct Vec5 { /// First component of the vector. pub x: N, @@ -517,7 +517,7 @@ rotate_impl!(Vec5) transform_impl!(Vec5) /// Vector of dimension 6. -#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)] +#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)] pub struct Vec6 { /// First component of the vector. pub x: N, diff --git a/src/structs/vec_macros.rs b/src/structs/vec_macros.rs index e01f48d8..761a7c1f 100644 --- a/src/structs/vec_macros.rs +++ b/src/structs/vec_macros.rs @@ -34,8 +34,8 @@ macro_rules! at_fast_impl( ) ) -// FIXME: N should be bounded by TotalOrd instead of Float… -// However, f32/f64 does not implement TotalOrd… +// FIXME: N should be bounded by Ord instead of Float… +// However, f32/f64 does not implement Ord… macro_rules! ord_impl( ($t: ident, $comp0: ident $(,$compN: ident)*) => ( impl PartialOrd for $t { diff --git a/src/traits/operations.rs b/src/traits/operations.rs index a79ef1be..382d3eb7 100644 --- a/src/traits/operations.rs +++ b/src/traits/operations.rs @@ -3,7 +3,7 @@ /// Result of a partial ordering. -#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Show)] +#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Show)] pub enum PartialOrdering { /// Result of a strict comparison. PartialLess,