Skip to content

Commit 825a3b1

Browse files
committed
String.truncate calls Vec.truncate, in turn, and that states
"is greater or equal to". Beside common sense.
1 parent 261823e commit 825a3b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/alloc/src/string.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1382,7 +1382,7 @@ impl String {
13821382

13831383
/// Shortens this `String` to the specified length.
13841384
///
1385-
/// If `new_len` is greater than the string's current length, this has no
1385+
/// If `new_len` is greater than or equal to the string's current length, this has no
13861386
/// effect.
13871387
///
13881388
/// Note that this method has no effect on the allocated capacity

0 commit comments

Comments
 (0)