Rollup merge of #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.
This commit is contained in:
Matthias Krüger 2024-05-03 06:04:20 +02:00 committed by GitHub
commit d7a8936b78
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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