Skip to content

Commit

Permalink
Auto merge of #29458 - tshepang:better, r=alexcrichton
Browse files Browse the repository at this point in the history
I see that `extend()` is not called if new_len > len()
  • Loading branch information
bors committed Oct 30, 2015
2 parents 2e07996 + d7a5aba commit 914c4db
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/libcollections/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -859,8 +859,9 @@ impl<T> Vec<T> {
impl<T: Clone> Vec<T> {
/// Resizes the `Vec` in-place so that `len()` is equal to `new_len`.
///
/// Calls either `extend()` or `truncate()` depending on whether `new_len`
/// is larger than the current value of `len()` or not.
/// If `new_len` is greater than `len()`, the `Vec` is extended by the
/// difference, with each additional slot filled with `value`.
/// If `new_len` is less than `len()`, the `Vec` is simply truncated.
///
/// # Examples
///
Expand Down

0 comments on commit 914c4db

Please sign in to comment.