Skip to content

Commit 6a14d42

Browse files
committed
---
yaml --- r: 42190 b: refs/heads/master c: 5aacf79 h: refs/heads/master v: v3
1 parent 8f24830 commit 6a14d42

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 9673005afeb19e7804e9d0d9f33a23d5a63a7e26
2+
refs/heads/master: 5aacf791e88428d146ab296587ec5d710fdb83b2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 2f46b763da2c098913884f101b6d71d69af41b49
55
refs/heads/try: 3d5418789064fdb463e872a4e651af1c628a3650

trunk/src/libcore/vec.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -541,10 +541,8 @@ pub fn remove<T>(v: &mut ~[T], i: uint) -> T {
541541
v.pop()
542542
}
543543

544-
pub fn consume<T>(v: ~[T], f: fn(uint, v: T)) {
544+
pub fn consume<T>(mut v: ~[T], f: fn(uint, v: T)) {
545545
unsafe {
546-
let mut v = v; // FIXME(#3488)
547-
548546
do as_mut_buf(v) |p, ln| {
549547
for uint::range(0, ln) |i| {
550548
// NB: This unsafe operation counts on init writing 0s to the
@@ -641,8 +639,7 @@ pub fn push_all<T: Copy>(v: &mut ~[T], rhs: &[const T]) {
641639
}
642640

643641
#[inline(always)]
644-
pub fn push_all_move<T>(v: &mut ~[T], rhs: ~[T]) {
645-
let mut rhs = rhs; // FIXME(#3488)
642+
pub fn push_all_move<T>(v: &mut ~[T], mut rhs: ~[T]) {
646643
reserve(&mut *v, v.len() + rhs.len());
647644
unsafe {
648645
do as_mut_buf(rhs) |p, len| {
@@ -1241,8 +1238,7 @@ pub pure fn zip_slice<T: Copy, U: Copy>(v: &[const T], u: &[const U])
12411238
* Returns a vector of tuples, where the i-th tuple contains contains the
12421239
* i-th elements from each of the input vectors.
12431240
*/
1244-
pub pure fn zip<T, U>(v: ~[T], u: ~[U]) -> ~[(T, U)] {
1245-
let mut v = v, u = u; // FIXME(#3488)
1241+
pub pure fn zip<T, U>(mut v: ~[T], mut u: ~[U]) -> ~[(T, U)] {
12461242
let mut i = len(v);
12471243
assert i == len(u);
12481244
let mut w = with_capacity(i);

0 commit comments

Comments
 (0)