about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libcollections/vec.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs
index 2ffc168f82c..b8efaa78af3 100644
--- a/src/libcollections/vec.rs
+++ b/src/libcollections/vec.rs
@@ -253,8 +253,7 @@ impl<T: Clone> Vec<T> {
     /// assert_eq!(vec, vec!("hello", "world", "world"));
     /// ```
     pub fn grow(&mut self, n: uint, value: &T) {
-        let new_len = self.len() + n;
-        self.reserve(new_len);
+        self.reserve_additional(n);
         let mut i: uint = 0u;
 
         while i < n {