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
fmease committed May 3, 2024
2 parents cd38eae + f840da7 commit dc754ca
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 dc754ca

Please sign in to comment.