aboutsummaryrefslogtreecommitdiff
path: root/src/lib/_vec.rs
diff options
context:
space:
mode:
authorRoy Frostig <[email protected]>2010-08-03 18:06:31 -0700
committerRoy Frostig <[email protected]>2010-08-03 18:06:31 -0700
commitd5fd81174ebbe9f588e9ee9edbb33c2830df948e (patch)
treea58915eeea0813aa653272c1d4074948af1b95f5 /src/lib/_vec.rs
parentMore stdlib hashmap bits (plus some drive-by extras). (diff)
downloadrust-d5fd81174ebbe9f588e9ee9edbb33c2830df948e.tar.xz
rust-d5fd81174ebbe9f588e9ee9edbb33c2830df948e.zip
Pass parametric types by-alias in various stdlib spots.
Diffstat (limited to 'src/lib/_vec.rs')
-rw-r--r--src/lib/_vec.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/_vec.rs b/src/lib/_vec.rs
index 0008295f..bec3d99e 100644
--- a/src/lib/_vec.rs
+++ b/src/lib/_vec.rs
@@ -32,7 +32,7 @@ fn init_elt[T](&T t, uint n_elts) -> vec[T] {
/**
* FIXME (issue #81): should be:
*
- * fn elt_op[T](T x, uint i) -> T { ret x; }
+ * fn elt_op[T](&T x, uint i) -> T { ret x; }
* let init_op[T] inner = bind elt_op[T](t, _);
* ret init_fn[T](inner, n_elts);
*/
@@ -70,7 +70,7 @@ fn slice[T](vec[T] v, int start, int end) -> vec[T] {
// Ought to take mutable &vec[T] v and just mutate it instead of copy
// and return. Blocking on issue #89 for this.
-fn grow[T](mutable vec[T] v, int n, T initval) -> vec[T] {
+fn grow[T](mutable vec[T] v, int n, &T initval) -> vec[T] {
let int i = n;
while (i > 0) {
i -= 1;