tests: Remove uses of advance.

This commit is contained in:
Luqman Aden 2014-07-07 15:22:23 -07:00
parent f61472d743
commit 5d39d0befa
3 changed files with 4 additions and 4 deletions

View File

@ -12,7 +12,7 @@ use std::vec::Vec;
fn main() {
let a: Vec<int> = Vec::new();
a.iter().advance(|_| -> bool {
a.iter().all(|_| -> bool {
//~^ ERROR mismatched types
});
}

View File

@ -19,13 +19,13 @@ trait iterable<A> {
impl<'a,A> iterable<A> for &'a [A] {
fn iterate(&self, f: |x: &A| -> bool) -> bool {
self.iter().advance(f)
self.iter().all(f)
}
}
impl<A> iterable<A> for Vec<A> {
fn iterate(&self, f: |x: &A| -> bool) -> bool {
self.iter().advance(f)
self.iter().all(f)
}
}

View File

@ -24,7 +24,7 @@ fn add_int(x: &mut Ints, v: int) {
fn iter_ints(x: &Ints, f: |x: &int| -> bool) -> bool {
let l = x.values.len();
range(0u, l).advance(|i| f(x.values.get(i)))
range(0u, l).all(|i| f(x.values.get(i)))
}
pub fn main() {