Skip to content

Commit 5796ebb

Browse files
committed
Address _vec.grow FIXME, as issue rust-lang#89 has been closed.
1 parent d5fd811 commit 5796ebb

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/lib/_vec.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,12 @@ fn slice[T](vec[T] v, int start, int end) -> vec[T] {
6868
ret result;
6969
}
7070

71-
// Ought to take mutable &vec[T] v and just mutate it instead of copy
72-
// and return. Blocking on issue #89 for this.
73-
fn grow[T](mutable vec[T] v, int n, &T initval) -> vec[T] {
71+
fn grow[T](&mutable vec[T] v, int n, &T initval) {
7472
let int i = n;
7573
while (i > 0) {
7674
i -= 1;
7775
v += vec(initval);
7876
}
79-
ret v;
8077
}
8178

8279
fn map[T,U](&op[T,U] f, &vec[T] v) -> vec[U] {

0 commit comments

Comments
 (0)