Skip to content

Commit 22f7c45

Browse files
authored
Rollup merge of rust-lang#124441 - bravequickcleverfibreyarn:string.rs, r=Amanieu
String.truncate comment microfix (greater or equal) String.truncate calls Vec.truncate, in turn, and that states "is greater or equal to". Beside common sense.
2 parents ed69db3 + 94de29b commit 22f7c45

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)