File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -999,6 +999,9 @@ impl String {
999999 /// If `new_len` is greater than the string's current length, this has no
10001000 /// effect.
10011001 ///
1002+ /// Note that this method has no effect on the allocated capacity
1003+ /// of the string
1004+ ///
10021005 /// # Panics
10031006 ///
10041007 /// Panics if `new_len` does not lie on a [`char`] boundary.
Original file line number Diff line number Diff line change @@ -548,6 +548,9 @@ impl<T> Vec<T> {
548548 /// The [`drain`] method can emulate `truncate`, but causes the excess
549549 /// elements to be returned instead of dropped.
550550 ///
551+ /// Note that this method has no effect on the allocated capacity
552+ /// of the vector.
553+ ///
551554 /// # Examples
552555 ///
553556 /// Truncating a five element vector to two elements:
@@ -1092,6 +1095,9 @@ impl<T> Vec<T> {
10921095
10931096 /// Clears the vector, removing all values.
10941097 ///
1098+ /// Note that this method has no effect on the allocated capacity
1099+ /// of the vector.
1100+ ///
10951101 /// # Examples
10961102 ///
10971103 /// ```
You can’t perform that action at this time.
0 commit comments