Skip to content

Commit

Permalink
Rollup merge of #124441 - bravequickcleverfibreyarn:string.rs, r=Amanieu
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
matthiaskrgr committed May 3, 2024
2 parents 9ab5cfd + f840da7 commit d7a8936
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/alloc/src/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1382,7 +1382,7 @@ impl String {

/// Shortens this `String` to the specified length.
///
/// If `new_len` is greater than the string's current length, this has no
/// If `new_len` is greater than or equal to the string's current length, this has no
/// effect.
///
/// Note that this method has no effect on the allocated capacity
Expand Down

0 comments on commit d7a8936

Please sign in to comment.