From e5ec803fa59ffc585b395ccf3b4cc67e6513c577 Mon Sep 17 00:00:00 2001 From: ozkriff Date: Mon, 24 Feb 2014 10:33:31 +0400 Subject: [PATCH] Updated to latest Rust --- src/cgmath/angle.rs | 4 ++-- src/cgmath/point.rs | 4 ++-- src/cgmath/vector.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cgmath/angle.rs b/src/cgmath/angle.rs index 89441b4..98feeec 100644 --- a/src/cgmath/angle.rs +++ b/src/cgmath/angle.rs @@ -23,8 +23,8 @@ use std::num::{One, one, Zero, zero, cast}; use approx::ApproxEq; -#[deriving(Clone, Eq, Ord, IterBytes)] pub struct Rad { s: S } -#[deriving(Clone, Eq, Ord, IterBytes)] pub struct Deg { s: S } +#[deriving(Clone, Eq, Ord, Hash)] pub struct Rad { s: S } +#[deriving(Clone, Eq, Ord, Hash)] pub struct Deg { s: S } #[inline] pub fn rad(s: S) -> Rad { Rad { s: s } } #[inline] pub fn deg(s: S) -> Deg { Deg { s: s } } diff --git a/src/cgmath/point.rs b/src/cgmath/point.rs index 2c3fea8..0a34e97 100644 --- a/src/cgmath/point.rs +++ b/src/cgmath/point.rs @@ -24,11 +24,11 @@ use array::*; use vector::*; /// A point in 2-dimensional space. -#[deriving(Eq, Clone, IterBytes)] +#[deriving(Eq, Clone, Hash)] pub struct Point2 { x: S, y: S } /// A point in 3-dimensional space. -#[deriving(Eq, Clone, IterBytes)] +#[deriving(Eq, Clone, Hash)] pub struct Point3 { x: S, y: S, z: S } diff --git a/src/cgmath/vector.rs b/src/cgmath/vector.rs index 6bd0080..3582a80 100644 --- a/src/cgmath/vector.rs +++ b/src/cgmath/vector.rs @@ -80,7 +80,7 @@ pub trait Vector // Utility macro for generating associated functions for the vectors macro_rules! vec( ($Self:ident <$S:ident> { $($field:ident),+ }, $n:expr) => ( - #[deriving(Eq, Clone, IterBytes)] + #[deriving(Eq, Clone, Hash)] pub struct $Self { $($field: S),+ } impl<$S: Primitive> $Self<$S> {