Rename variables that clash with keywords

This commit is contained in:
Brian Anderson
2012-09-09 16:53:19 -07:00
parent 9007afab0a
commit f53c2948aa
7 changed files with 43 additions and 43 deletions

View File

@@ -420,17 +420,17 @@ fn test_select2_stress() {
};
}
let mut as = 0;
let mut as_ = 0;
let mut bs = 0;
for iter::repeat(msgs * times * 2u) {
match select2(po_a, po_b) {
either::Left(~"a") => as += 1,
either::Left(~"a") => as_ += 1,
either::Right(~"b") => bs += 1,
_ => fail ~"test_select_2_stress failed"
}
}
assert as == 400;
assert as_ == 400;
assert bs == 400;
}

View File

@@ -1029,15 +1029,15 @@ pure fn rposition_between<T>(v: &[T], start: uint, end: uint,
* Convert a vector of pairs into a pair of vectors, by reference. As unzip().
*/
pure fn unzip_slice<T: Copy, U: Copy>(v: &[(T, U)]) -> (~[T], ~[U]) {
let mut as = ~[], bs = ~[];
let mut as_ = ~[], bs = ~[];
for each(v) |p| {
let (a, b) = p;
unchecked {
vec::push(as, a);
vec::push(as_, a);
vec::push(bs, b);
}
}
return (as, bs);
return (as_, bs);
}
/**