We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 01fd4d6 commit d7a5abaCopy full SHA for d7a5aba
src/libcollections/vec.rs
@@ -859,8 +859,9 @@ impl<T> Vec<T> {
859
impl<T: Clone> Vec<T> {
860
/// Resizes the `Vec` in-place so that `len()` is equal to `new_len`.
861
///
862
- /// Calls either `extend()` or `truncate()` depending on whether `new_len`
863
- /// 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`.
864
+ /// If `new_len` is less than `len()`, the `Vec` is simply truncated.
865
866
/// # Examples
867
0 commit comments