core: Make range follow the for loop protocol

This commit is contained in:
Brian Anderson
2012-05-26 00:32:08 -07:00
parent 5281db2bc2
commit 432c6cbde9
46 changed files with 102 additions and 88 deletions

View File

@@ -892,7 +892,7 @@ Both vectors must have the same length
#[inline]
fn iter2<U, T>(v1: [const U], v2: [const T], f: fn(U, T)) {
assert len(v1) == len(v2);
uint::range(0u, len(v1)) {|i|
for uint::range(0u, len(v1)) {|i|
f(v1[i], v2[i])
}
}