Skip to content

Commit 7b268e8

Browse files
committed
Cleanup FIXMEs (#3488)
1 parent 42b462e commit 7b268e8

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

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)