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 @@ -545,6 +545,9 @@ impl<T> Vec<T> {
545545 /// The [`drain`] method can emulate `truncate`, but causes the excess
546546 /// elements to be returned instead of dropped.
547547 ///
548+ /// Note that this method has no effect on the allocated capacity
549+ /// of the vector.
550+ ///
548551 /// # Examples
549552 ///
550553 /// Truncating a five element vector to two elements:
@@ -1089,6 +1092,9 @@ impl<T> Vec<T> {
10891092
10901093 /// Clears the vector, removing all values.
10911094 ///
1095+ /// Note that this method has no effect on the allocated capacity
1096+ /// of the vector.
1097+ ///
10921098 /// # Examples
10931099 ///
10941100 /// ```
You can’t perform that action at this time.
0 commit comments