@@ -541,10 +541,8 @@ pub fn remove<T>(v: &mut ~[T], i: uint) -> T {
541
541
v. pop ( )
542
542
}
543
543
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 ) ) {
545
545
unsafe {
546
- let mut v = v; // FIXME(#3488)
547
-
548
546
do as_mut_buf ( v) |p, ln| {
549
547
for uint:: range( 0 , ln) |i| {
550
548
// 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]) {
641
639
}
642
640
643
641
#[ 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 ] ) {
646
643
reserve ( & mut * v, v. len ( ) + rhs. len ( ) ) ;
647
644
unsafe {
648
645
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])
1241
1238
* Returns a vector of tuples, where the i-th tuple contains contains the
1242
1239
* i-th elements from each of the input vectors.
1243
1240
*/
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 ) ] {
1246
1242
let mut i = len ( v) ;
1247
1243
assert i == len ( u) ;
1248
1244
let mut w = with_capacity ( i) ;
0 commit comments