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 @@ -545,6 +545,9 @@ impl<T> Vec<T> {
545
545
/// The [`drain`] method can emulate `truncate`, but causes the excess
546
546
/// elements to be returned instead of dropped.
547
547
///
548
+ /// Note that this method has no effect on the allocated capacity
549
+ /// of the vector.
550
+ ///
548
551
/// # Examples
549
552
///
550
553
/// Truncating a five element vector to two elements:
@@ -1089,6 +1092,9 @@ impl<T> Vec<T> {
1089
1092
1090
1093
/// Clears the vector, removing all values.
1091
1094
///
1095
+ /// Note that this method has no effect on the allocated capacity
1096
+ /// of the vector.
1097
+ ///
1092
1098
/// # Examples
1093
1099
///
1094
1100
/// ```
You can’t perform that action at this time.
0 commit comments