1
Fork 0

vec: remove BaseIter implementation

I removed the `static-method-test.rs` test because it was heavily based
on `BaseIter` and there are plenty of other more complex uses of static
methods anyway.
This commit is contained in:
Daniel Micay 2013-06-21 08:29:53 -04:00
parent c9342663df
commit d2e9912aea
181 changed files with 796 additions and 876 deletions

View file

@ -17,9 +17,10 @@ The `ToBytes` and `IterBytes` traits
use cast;
use io;
use io::Writer;
use iterator::IteratorUtil;
use option::{None, Option, Some};
use old_iter::BaseIter;
use str::StrSlice;
use vec::ImmutableVector;
pub type Cb<'self> = &'self fn(buf: &[u8]) -> bool;
@ -223,7 +224,7 @@ impl IterBytes for f64 {
impl<'self,A:IterBytes> IterBytes for &'self [A] {
#[inline]
fn iter_bytes(&self, lsb0: bool, f: Cb) -> bool {
self.each(|elt| elt.iter_bytes(lsb0, |b| f(b)))
self.iter().advance(|elt| elt.iter_bytes(lsb0, |b| f(b)))
}
}