about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libcore/vec.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libcore/vec.rs b/src/libcore/vec.rs
index e478936ff65..f5ed574527d 100644
--- a/src/libcore/vec.rs
+++ b/src/libcore/vec.rs
@@ -173,6 +173,7 @@ pub fn from_slice<T:Copy>(t: &[T]) -> ~[T] {
     from_fn(t.len(), |i| t[i])
 }
 
+/// Creates a new vector with a capacity of `capacity`
 pub fn with_capacity<T>(capacity: uint) -> ~[T] {
     let mut vec = ~[];
     reserve(&mut vec, capacity);