Demode iter::foldl and friends

This commit is contained in:
Tim Chevalier
2012-09-28 16:37:14 -07:00
parent fdc6062136
commit a3a257cc3b
9 changed files with 42 additions and 47 deletions

View File

@@ -675,7 +675,7 @@ mod tests {
#[test]
fn test_dlist_foldl() {
let l = from_vec(vec::from_fn(101, |x|x));
assert iter::foldl(l, 0, |accum,elem| accum+elem) == 5050;
assert iter::foldl(&l, 0, |accum,elem| *accum+*elem) == 5050;
}
#[test]
fn test_dlist_break_early() {