diff options
| author | bors <bors@rust-lang.org> | 2013-05-20 02:46:36 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-05-20 02:46:36 -0700 |
| commit | 2e6cda254a2acdcd60efb62a27f69c7702b8f71e (patch) | |
| tree | ba2b843a8a0cd261cf94b4e6ab017d0918841f3c /src/libcore/iterator.rs | |
| parent | ab46a38039c320bd2011160fdd8a86828172d29e (diff) | |
| parent | 66319b027888ceddf024a5919e007caceaf369f3 (diff) | |
| download | rust-2e6cda254a2acdcd60efb62a27f69c7702b8f71e.tar.gz rust-2e6cda254a2acdcd60efb62a27f69c7702b8f71e.zip | |
auto merge of #6635 : brson/rust/snapshot, r=brson
Diffstat (limited to 'src/libcore/iterator.rs')
| -rw-r--r-- | src/libcore/iterator.rs | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/libcore/iterator.rs b/src/libcore/iterator.rs index ecf76a39fcd..a5679e6dbff 100644 --- a/src/libcore/iterator.rs +++ b/src/libcore/iterator.rs @@ -43,11 +43,7 @@ pub trait IteratorUtil<A> { fn take(self, n: uint) -> TakeIterator<Self>; fn scan<'r, St, B>(self, initial_state: St, f: &'r fn(&mut St, A) -> Option<B>) -> ScanIterator<'r, A, B, Self, St>; - #[cfg(stage0)] - fn advance(&mut self, f: &fn(A) -> bool); - #[cfg(not(stage0))] fn advance(&mut self, f: &fn(A) -> bool) -> bool; - #[cfg(not(stage0))] fn to_vec(&mut self) -> ~[A]; fn nth(&mut self, n: uint) -> Option<A>; fn last(&mut self) -> Option<A>; @@ -121,21 +117,6 @@ impl<A, T: Iterator<A>> IteratorUtil<A> for T { /// A shim implementing the `for` loop iteration protocol for iterator objects #[inline] - #[cfg(stage0)] - fn advance(&mut self, f: &fn(A) -> bool) { - loop { - match self.next() { - Some(x) => { - if !f(x) { return; } - } - None => { return; } - } - } - } - - /// A shim implementing the `for` loop iteration protocol for iterator objects - #[inline] - #[cfg(not(stage0))] fn advance(&mut self, f: &fn(A) -> bool) -> bool { loop { match self.next() { @@ -147,7 +128,6 @@ impl<A, T: Iterator<A>> IteratorUtil<A> for T { } } - #[cfg(not(stage0))] #[inline(always)] fn to_vec(&mut self) -> ~[A] { iter::to_vec::<A>(|f| self.advance(f)) |
