Skip to content

Commit

Permalink
Rollup merge of rust-lang#124441 - bravequickcleverfibreyarn:string.r…
Browse files Browse the repository at this point in the history
…s, 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.
  • Loading branch information
matthiaskrgr authored May 2, 2024
2 parents 198852b + f840da7 commit 9fafce7
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 9fafce7

Please sign in to comment.