diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2012-09-26 17:33:34 -0700 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2012-09-26 18:02:07 -0700 |
| commit | 67a8e7128aea292445b763b47b04bc5f4fd43cb2 (patch) | |
| tree | 9ddde322dbc8fd5af39e903419cae508d9df05f6 /src/libcore/dvec.rs | |
| parent | cd79e1d1b20a2c289dd15bc2766f97c789d975aa (diff) | |
| download | rust-67a8e7128aea292445b763b47b04bc5f4fd43cb2.tar.gz rust-67a8e7128aea292445b763b47b04bc5f4fd43cb2.zip | |
Demode vec::push (and convert to method)
Diffstat (limited to 'src/libcore/dvec.rs')
| -rw-r--r-- | src/libcore/dvec.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libcore/dvec.rs b/src/libcore/dvec.rs index 9d3d2e97f9a..eb221926fc1 100644 --- a/src/libcore/dvec.rs +++ b/src/libcore/dvec.rs @@ -172,7 +172,7 @@ impl<A> DVec<A> { if data_ptr.is_null() { fail ~"Recursive use of dvec"; } log(error, ~"a"); self.data <- ~[move t]; - vec::push_all_move(self.data, move data); + self.data.push_all_move(move data); log(error, ~"b"); } } @@ -180,7 +180,7 @@ impl<A> DVec<A> { /// Append a single item to the end of the list fn push(+t: A) { self.check_not_borrowed(); - vec::push(self.data, move t); + self.data.push(move t); } /// Remove and return the first element @@ -240,7 +240,7 @@ impl<A: Copy> DVec<A> { vec::reserve(&mut v, new_len); let mut i = from_idx; while i < to_idx { - vec::push(v, ts[i]); + v.push(ts[i]); i += 1u; } move v @@ -266,7 +266,7 @@ impl<A: Copy> DVec<A> { } }; - for ts.each |t| { vec::push(v, *t) }; + for ts.each |t| { v.push(*t) }; v } } |
