diff --git a/src/structs/dvec.rs b/src/structs/dvec.rs index a2711c2f..77ffe8e6 100644 --- a/src/structs/dvec.rs +++ b/src/structs/dvec.rs @@ -6,7 +6,7 @@ use std::num::{Zero, One, Real}; use std::rand::Rand; use std::rand; use std::vec; -use std::vec::{VecIterator, VecMutIterator}; +use std::vec::{Items, MutItems}; use traits::operations::ApproxEq; use std::iter::FromIterator; use traits::geometry::{Dot, Norm}; @@ -152,14 +152,14 @@ impl Container for DVec { impl Iterable for DVec { #[inline] - fn iter<'l>(&'l self) -> VecIterator<'l, N> { + fn iter<'l>(&'l self) -> Items<'l, N> { self.at.iter() } } impl IterableMut for DVec { #[inline] - fn mut_iter<'l>(&'l mut self) -> VecMutIterator<'l, N> { + fn mut_iter<'l>(&'l mut self) -> MutItems<'l, N> { self.at.mut_iter() } } diff --git a/src/structs/mat.rs b/src/structs/mat.rs index 6bafa927..57311cbf 100644 --- a/src/structs/mat.rs +++ b/src/structs/mat.rs @@ -5,7 +5,7 @@ use std::cast; use std::num::{One, Zero}; use traits::operations::ApproxEq; -use std::vec::{VecIterator, VecMutIterator}; +use std::vec::{Items, MutItems}; use structs::vec::{Vec1, Vec2, Vec3, Vec4, Vec5, Vec6, Vec1MulRhs, Vec4MulRhs, Vec5MulRhs, Vec6MulRhs}; diff --git a/src/structs/mat_macros.rs b/src/structs/mat_macros.rs index 8abf00c5..e8870130 100644 --- a/src/structs/mat_macros.rs +++ b/src/structs/mat_macros.rs @@ -124,7 +124,7 @@ macro_rules! iterable_impl( ($t: ident, $dim: expr) => ( impl Iterable for $t { #[inline] - fn iter<'l>(&'l self) -> VecIterator<'l, N> { + fn iter<'l>(&'l self) -> Items<'l, N> { unsafe { cast::transmute::<&'l $t, &'l [N, ..$dim * $dim]>(self).iter() } @@ -137,7 +137,7 @@ macro_rules! iterable_mut_impl( ($t: ident, $dim: expr) => ( impl IterableMut for $t { #[inline] - fn mut_iter<'l>(&'l mut self) -> VecMutIterator<'l, N> { + fn mut_iter<'l>(&'l mut self) -> MutItems<'l, N> { unsafe { cast::transmute::<&'l mut $t, &'l mut [N, ..$dim * $dim]>(self).mut_iter() } diff --git a/src/structs/spec/vec0.rs b/src/structs/spec/vec0.rs index 384d7f64..5d0da33b 100644 --- a/src/structs/spec/vec0.rs +++ b/src/structs/spec/vec0.rs @@ -1,6 +1,6 @@ use std::cast; use std::num::{Zero, One, Real, Bounded}; -use std::vec::{VecIterator, VecMutIterator}; +use std::vec::{Items, MutItems}; use std::iter::{Iterator, FromIterator}; use traits::operations::ApproxEq; use traits::structure::{Iterable, IterableMut, Indexable, Basis, Dim}; @@ -49,14 +49,14 @@ impl vec::Vec0 { impl Iterable for vec::Vec0 { #[inline] - fn iter<'l>(&'l self) -> VecIterator<'l, N> { + fn iter<'l>(&'l self) -> Items<'l, N> { unsafe { cast::transmute::<&'l vec::Vec0, &'l [N, ..0]>(self).iter() } } } impl IterableMut for vec::Vec0 { #[inline] - fn mut_iter<'l>(&'l mut self) -> VecMutIterator<'l, N> { + fn mut_iter<'l>(&'l mut self) -> MutItems<'l, N> { unsafe { cast::transmute::<&'l mut vec::Vec0, &'l mut [N, ..0]>(self).mut_iter() } } } diff --git a/src/structs/vec.rs b/src/structs/vec.rs index d0c3e54a..a2976bc0 100644 --- a/src/structs/vec.rs +++ b/src/structs/vec.rs @@ -4,7 +4,7 @@ use std::cast; use std::num::{Zero, One, Real, Bounded}; -use std::vec::{VecIterator, VecMutIterator}; +use std::vec::{Items, MutItems}; use std::iter::{Iterator, FromIterator}; use traits::operations::ApproxEq; diff --git a/src/structs/vec_macros.rs b/src/structs/vec_macros.rs index cb0004eb..878da7cb 100644 --- a/src/structs/vec_macros.rs +++ b/src/structs/vec_macros.rs @@ -177,7 +177,7 @@ macro_rules! iterable_impl( ($t: ident, $dim: expr) => ( impl Iterable for $t { #[inline] - fn iter<'l>(&'l self) -> VecIterator<'l, N> { + fn iter<'l>(&'l self) -> Items<'l, N> { unsafe { cast::transmute::<&'l $t, &'l [N, ..$dim]>(self).iter() } @@ -190,7 +190,7 @@ macro_rules! iterable_mut_impl( ($t: ident, $dim: expr) => ( impl IterableMut for $t { #[inline] - fn mut_iter<'l>(&'l mut self) -> VecMutIterator<'l, N> { + fn mut_iter<'l>(&'l mut self) -> MutItems<'l, N> { unsafe { cast::transmute::<&'l mut $t, &'l mut [N, ..$dim]>(self).mut_iter() } diff --git a/src/traits/structure.rs b/src/traits/structure.rs index 45f99d02..7f14c1eb 100644 --- a/src/traits/structure.rs +++ b/src/traits/structure.rs @@ -1,7 +1,7 @@ //! Traits giving structural informations on linear algebra objects or the space they live in. use std::num::{Zero, Bounded}; -use std::vec::{VecIterator, VecMutIterator}; +use std::vec::{Items, MutItems}; use traits::operations::{RMul, LMul, ScalarAdd, ScalarSub}; use traits::geometry::{Dot, Norm, UniformSphereSample}; @@ -129,7 +129,7 @@ pub trait Indexable { /// Traits of objects which can be iterated through like a vector. pub trait Iterable { /// Gets a vector-like read-only iterator. - fn iter<'l>(&'l self) -> VecIterator<'l, N>; + fn iter<'l>(&'l self) -> Items<'l, N>; } /// This is a workaround of current Rust limitations. @@ -137,5 +137,5 @@ pub trait Iterable { /// Traits of mutable objects which can be iterated through like a vector. pub trait IterableMut { /// Gets a vector-like read-write iterator. - fn mut_iter<'l>(&'l mut self) -> VecMutIterator<'l, N>; + fn mut_iter<'l>(&'l mut self) -> MutItems<'l, N>; }