We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2e07996 + d7a5aba commit 914c4dbCopy full SHA for 914c4db
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