diff --git a/src/structs/dvec.rs b/src/structs/dvec.rs index 02cbc5b6..e99b1524 100644 --- a/src/structs/dvec.rs +++ b/src/structs/dvec.rs @@ -4,7 +4,7 @@ use std::rand::Rand; use std::rand; -use std::slice::{Items, MutItems}; +use std::slice::{Iter, IterMut}; use std::iter::FromIterator; use traits::operations::{ApproxEq, Axpy}; use traits::geometry::{Dot, Norm}; diff --git a/src/structs/dvec_macros.rs b/src/structs/dvec_macros.rs index 4d67fc96..1e0adbdb 100644 --- a/src/structs/dvec_macros.rs +++ b/src/structs/dvec_macros.rs @@ -110,14 +110,14 @@ macro_rules! dvec_impl( impl Iterable for $dvec { #[inline] - fn iter<'l>(&'l self) -> Items<'l, N> { + fn iter<'l>(&'l self) -> Iter<'l, N> { self.as_slice().iter() } } impl IterableMut for $dvec { #[inline] - fn iter_mut<'l>(&'l mut self) -> MutItems<'l, N> { + fn iter_mut<'l>(&'l mut self) -> IterMut<'l, N> { self.as_mut_slice().iter_mut() } } diff --git a/src/structs/mat.rs b/src/structs/mat.rs index d48b911b..7db026e8 100644 --- a/src/structs/mat.rs +++ b/src/structs/mat.rs @@ -4,7 +4,7 @@ use std::mem; use traits::operations::ApproxEq; -use std::slice::{Items, MutItems}; +use std::slice::{Iter, IterMut}; use structs::vec::{Vec1, Vec2, Vec3, Vec4, Vec5, Vec6}; use structs::pnt::{Pnt1, Pnt4, Pnt5, Pnt6}; use structs::dvec::{DVec1, DVec2, DVec3, DVec4, DVec5, DVec6}; diff --git a/src/structs/mat_macros.rs b/src/structs/mat_macros.rs index 78ac9851..9d91d5e5 100644 --- a/src/structs/mat_macros.rs +++ b/src/structs/mat_macros.rs @@ -181,7 +181,7 @@ macro_rules! iterable_impl( ($t: ident, $dim: expr) => ( impl Iterable for $t { #[inline] - fn iter<'l>(&'l self) -> Items<'l, N> { + fn iter<'l>(&'l self) -> Iter<'l, N> { unsafe { mem::transmute::<&'l $t, &'l [N, ..$dim * $dim]>(self).iter() } @@ -194,7 +194,7 @@ macro_rules! iterable_mut_impl( ($t: ident, $dim: expr) => ( impl IterableMut for $t { #[inline] - fn iter_mut<'l>(&'l mut self) -> MutItems<'l, N> { + fn iter_mut<'l>(&'l mut self) -> IterMut<'l, N> { unsafe { mem::transmute::<&'l mut $t, &'l mut [N, ..$dim * $dim]>(self).iter_mut() } diff --git a/src/structs/pnt.rs b/src/structs/pnt.rs index 4b77a39e..06dcb11d 100644 --- a/src/structs/pnt.rs +++ b/src/structs/pnt.rs @@ -3,7 +3,7 @@ #![allow(missing_docs)] // we allow missing to avoid having to document the point components. use std::mem; -use std::slice::{Items, MutItems}; +use std::slice::{Iter, IterMut}; use std::iter::{Iterator, FromIterator}; use traits::operations::{ApproxEq, POrd, POrdering, Axpy, ScalarAdd, ScalarSub, ScalarMul, ScalarDiv}; diff --git a/src/structs/quat.rs b/src/structs/quat.rs index e975f813..1a92628a 100644 --- a/src/structs/quat.rs +++ b/src/structs/quat.rs @@ -5,7 +5,7 @@ use std::mem; use std::num; use std::rand::{Rand, Rng}; -use std::slice::{Items, MutItems}; +use std::slice::{Iter, IterMut}; use structs::{Vec3, Pnt3, Rot3, Mat3}; use traits::operations::{ApproxEq, Inv, POrd, POrdering, Axpy, ScalarAdd, ScalarSub, ScalarMul, ScalarDiv}; diff --git a/src/structs/spec/vec0.rs b/src/structs/spec/vec0.rs index 8e8c6da5..c1864867 100644 --- a/src/structs/spec/vec0.rs +++ b/src/structs/spec/vec0.rs @@ -1,5 +1,5 @@ use std::mem; -use std::slice::{Items, MutItems}; +use std::slice::{Iter, IterMut}; use std::iter::{Iterator, FromIterator}; use traits::operations::ApproxEq; use traits::structure::{Iterable, IterableMut, Indexable, Basis, Dim, Shape, BaseFloat, BaseNum, @@ -66,14 +66,14 @@ impl Indexable for vec::Vec0 { impl Iterable for vec::Vec0 { #[inline] - fn iter<'l>(&'l self) -> Items<'l, N> { + fn iter<'l>(&'l self) -> Iter<'l, N> { unsafe { mem::transmute::<&'l vec::Vec0, &'l [N, ..0]>(self).iter() } } } impl IterableMut for vec::Vec0 { #[inline] - fn iter_mut<'l>(&'l mut self) -> MutItems<'l, N> { + fn iter_mut<'l>(&'l mut self) -> IterMut<'l, N> { unsafe { mem::transmute::<&'l mut vec::Vec0, &'l mut [N, ..0]>(self).iter_mut() } } } diff --git a/src/structs/vec.rs b/src/structs/vec.rs index 1f5c01bf..16e242df 100644 --- a/src/structs/vec.rs +++ b/src/structs/vec.rs @@ -3,7 +3,7 @@ #![allow(missing_docs)] // we allow missing to avoid having to document the dispatch traits. use std::mem; -use std::slice::{Items, MutItems}; +use std::slice::{Iter, IterMut}; use std::iter::{Iterator, FromIterator}; use traits::operations::{ApproxEq, POrd, POrdering, Axpy, ScalarAdd, ScalarSub, ScalarMul, ScalarDiv, Absolute}; diff --git a/src/structs/vec_macros.rs b/src/structs/vec_macros.rs index 50fd4d44..8f5aa036 100644 --- a/src/structs/vec_macros.rs +++ b/src/structs/vec_macros.rs @@ -269,7 +269,7 @@ macro_rules! iterable_impl( ($t: ident, $dim: expr) => ( impl Iterable for $t { #[inline] - fn iter<'l>(&'l self) -> Items<'l, N> { + fn iter<'l>(&'l self) -> Iter<'l, N> { unsafe { mem::transmute::<&'l $t, &'l [N, ..$dim]>(self).iter() } @@ -282,7 +282,7 @@ macro_rules! iterable_mut_impl( ($t: ident, $dim: expr) => ( impl IterableMut for $t { #[inline] - fn iter_mut<'l>(&'l mut self) -> MutItems<'l, N> { + fn iter_mut<'l>(&'l mut self) -> IterMut<'l, N> { unsafe { mem::transmute::<&'l mut $t, &'l mut [N, ..$dim]>(self).iter_mut() } diff --git a/src/traits/structure.rs b/src/traits/structure.rs index c3870936..76a9beca 100644 --- a/src/traits/structure.rs +++ b/src/traits/structure.rs @@ -3,7 +3,7 @@ use std::f32; use std::f64; use std::num::{Int, Float, FloatMath}; -use std::slice::{Items, MutItems}; +use std::slice::{Iter, IterMut}; use traits::operations::{RMul, LMul, Axpy, Transpose, Inv, Absolute}; use traits::geometry::{Dot, Norm, Orig}; @@ -209,7 +209,7 @@ pub trait Indexable: Shape + IndexMut { /// 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) -> Items<'l, N>; + fn iter<'l>(&'l self) -> Iter<'l, N>; } /// This is a workaround of current Rust limitations. @@ -217,7 +217,7 @@ 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 iter_mut<'l>(&'l mut self) -> MutItems<'l, N>; + fn iter_mut<'l>(&'l mut self) -> IterMut<'l, N>; } /*