diff options
| author | Marvin Löbel <loebel.marvin@gmail.com> | 2013-06-04 10:06:24 +0200 |
|---|---|---|
| committer | Marvin Löbel <loebel.marvin@gmail.com> | 2013-06-06 22:11:48 +0200 |
| commit | 070015468d014f93da2a366f7f5e37c0678f6c5b (patch) | |
| tree | b603cf5326186d36a3d3f1677dcde81bb18829e8 /src/libstd/iterator.rs | |
| parent | 857d433b9a300989f373f34771218895ec59715a (diff) | |
| download | rust-070015468d014f93da2a366f7f5e37c0678f6c5b.tar.gz rust-070015468d014f93da2a366f7f5e37c0678f6c5b.zip | |
Removed IteratorUtil::to_vec and iter::to_vec
Diffstat (limited to 'src/libstd/iterator.rs')
| -rw-r--r-- | src/libstd/iterator.rs | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/libstd/iterator.rs b/src/libstd/iterator.rs index 14f161380aa..2a3bbc3322d 100644 --- a/src/libstd/iterator.rs +++ b/src/libstd/iterator.rs @@ -242,20 +242,6 @@ pub trait IteratorUtil<A> { /// ~~~ fn advance(&mut self, f: &fn(A) -> bool) -> bool; - /// Loops through the entire iterator, accumulating all of the elements into - /// a vector. - /// - /// # Example - /// - /// ~~~ {.rust} - /// use std::iterator::*; - /// - /// let a = [1, 2, 3, 4, 5]; - /// let b = a.iter().transform(|&x| x).to_vec(); - /// assert!(a == b); - /// ~~~ - fn to_vec(&mut self) -> ~[A]; - /// Loops through the entire iterator, collecting all of the elements into /// a container implementing `FromIter`. /// @@ -430,11 +416,6 @@ impl<A, T: Iterator<A>> IteratorUtil<A> for T { } #[inline(always)] - fn to_vec(&mut self) -> ~[A] { - iter::to_vec::<A>(|f| self.advance(f)) - } - - #[inline(always)] fn collect<B: FromIter<A>>(&mut self) -> B { FromIter::from_iter::<A, B>(|f| self.advance(f)) } |
