File tree 2 files changed +9
-0
lines changed
2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -999,6 +999,9 @@ impl String {
999
999
/// If `new_len` is greater than the string's current length, this has no
1000
1000
/// effect.
1001
1001
///
1002
+ /// Note that this method has no effect on the allocated capacity
1003
+ /// of the string
1004
+ ///
1002
1005
/// # Panics
1003
1006
///
1004
1007
/// 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> {
548
548
/// The [`drain`] method can emulate `truncate`, but causes the excess
549
549
/// elements to be returned instead of dropped.
550
550
///
551
+ /// Note that this method has no effect on the allocated capacity
552
+ /// of the vector.
553
+ ///
551
554
/// # Examples
552
555
///
553
556
/// Truncating a five element vector to two elements:
@@ -1092,6 +1095,9 @@ impl<T> Vec<T> {
1092
1095
1093
1096
/// Clears the vector, removing all values.
1094
1097
///
1098
+ /// Note that this method has no effect on the allocated capacity
1099
+ /// of the vector.
1100
+ ///
1095
1101
/// # Examples
1096
1102
///
1097
1103
/// ```
You can’t perform that action at this time.
0 commit comments