diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2012-09-18 18:31:59 -0700 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2012-09-18 21:31:00 -0700 |
| commit | 1be24f0758d3075d2e7f141f8831bb8a233ce86e (patch) | |
| tree | 28b93c29c3b427f7cd84142a49b1b86222d700eb /src/libcore/at_vec.rs | |
| parent | e17a3b3194cc5dc213d13ff6499c93482215c223 (diff) | |
| download | rust-1be24f0758d3075d2e7f141f8831bb8a233ce86e.tar.gz rust-1be24f0758d3075d2e7f141f8831bb8a233ce86e.zip | |
replace explicit calls to vec::each with vec::each_ref, partially demode str
Diffstat (limited to 'src/libcore/at_vec.rs')
| -rw-r--r-- | src/libcore/at_vec.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcore/at_vec.rs b/src/libcore/at_vec.rs index 069bc625623..b9c0122df3f 100644 --- a/src/libcore/at_vec.rs +++ b/src/libcore/at_vec.rs @@ -91,7 +91,7 @@ pure fn build_sized_opt<A>(size: Option<uint>, #[inline(always)] pure fn append<T: Copy>(lhs: @[T], rhs: &[const T]) -> @[T] { do build_sized(lhs.len() + rhs.len()) |push| { - for vec::each(lhs) |x| { push(x); } + for vec::each_ref(lhs) |x| { push(*x); } for uint::range(0, rhs.len()) |i| { push(rhs[i]); } } } @@ -100,8 +100,8 @@ pure fn append<T: Copy>(lhs: @[T], rhs: &[const T]) -> @[T] { /// Apply a function to each element of a vector and return the results pure fn map<T, U>(v: &[T], f: fn(T) -> U) -> @[U] { do build_sized(v.len()) |push| { - for vec::each(v) |elem| { - push(f(elem)); + for vec::each_ref(v) |elem| { + push(f(*elem)); } } } |
