diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2013-06-12 21:56:16 -0400 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2013-06-14 23:15:42 -0400 |
| commit | d68be89e6912a394beb12c2731bdc6240a81655b (patch) | |
| tree | 8b700635e6a7578df372f0600264e1777e21ba91 /src/libstd | |
| parent | 8111701604976d3b0e9e70db621784aefda456b0 (diff) | |
| download | rust-d68be89e6912a394beb12c2731bdc6240a81655b.tar.gz rust-d68be89e6912a394beb12c2731bdc6240a81655b.zip | |
rm MutableIter
replaced with mutable implementations of Iterator
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/old_iter.rs | 4 | ||||
| -rw-r--r-- | src/libstd/prelude.rs | 2 | ||||
| -rw-r--r-- | src/libstd/vec.rs | 23 |
3 files changed, 1 insertions, 28 deletions
diff --git a/src/libstd/old_iter.rs b/src/libstd/old_iter.rs index db4da833dd8..e0a01a41f0a 100644 --- a/src/libstd/old_iter.rs +++ b/src/libstd/old_iter.rs @@ -33,10 +33,6 @@ pub trait ReverseIter<A>: BaseIter<A> { fn each_reverse(&self, blk: &fn(&A) -> bool) -> bool; } -pub trait MutableIter<A>: BaseIter<A> { - fn each_mut(&mut self, blk: &fn(&mut A) -> bool) -> bool; -} - pub trait ExtendedIter<A> { fn eachi(&self, blk: &fn(uint, v: &A) -> bool) -> bool; fn all(&self, blk: &fn(&A) -> bool) -> bool; diff --git a/src/libstd/prelude.rs b/src/libstd/prelude.rs index ec0269fc462..c61995619a4 100644 --- a/src/libstd/prelude.rs +++ b/src/libstd/prelude.rs @@ -46,7 +46,7 @@ pub use cmp::{Eq, ApproxEq, Ord, TotalEq, TotalOrd, Ordering, Less, Equal, Great pub use char::Char; pub use container::{Container, Mutable, Map, Set}; pub use hash::Hash; -pub use old_iter::{BaseIter, ReverseIter, MutableIter, ExtendedIter, EqIter}; +pub use old_iter::{BaseIter, ReverseIter, ExtendedIter, EqIter}; pub use old_iter::{CopyableIter, CopyableOrderedIter, CopyableNonstrictIter}; pub use iter::{Times, FromIter}; pub use iterator::{Iterator, IteratorUtil}; diff --git a/src/libstd/vec.rs b/src/libstd/vec.rs index d139bcb40f4..b5ae605e03c 100644 --- a/src/libstd/vec.rs +++ b/src/libstd/vec.rs @@ -2487,29 +2487,6 @@ impl<A> old_iter::BaseIter<A> for @[A] { fn size_hint(&self) -> Option<uint> { Some(self.len()) } } -impl<'self,A> old_iter::MutableIter<A> for &'self mut [A] { - #[inline(always)] - fn each_mut<'a>(&'a mut self, blk: &fn(v: &'a mut A) -> bool) -> bool { - self.mut_iter().advance(blk) - } -} - -// FIXME(#4148): This should be redundant -impl<A> old_iter::MutableIter<A> for ~[A] { - #[inline(always)] - fn each_mut<'a>(&'a mut self, blk: &fn(v: &'a mut A) -> bool) -> bool { - self.mut_iter().advance(blk) - } -} - -// FIXME(#4148): This should be redundant -impl<A> old_iter::MutableIter<A> for @mut [A] { - #[inline(always)] - fn each_mut(&mut self, blk: &fn(v: &mut A) -> bool) -> bool { - self.mut_iter().advance(blk) - } -} - impl<'self,A> old_iter::ExtendedIter<A> for &'self [A] { pub fn eachi(&self, blk: &fn(uint, v: &A) -> bool) -> bool { old_iter::eachi(self, blk) |
