about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-05-03 06:04:20 +0200
committerGitHub <noreply@github.com>2024-05-03 06:04:20 +0200
commitd7a8936b78b9073842e46098df1cb73344598389 (patch)
tree754371d05ec30ae8291059f8193161cb21ca34e8
parent9ab5cfd91e60c1691e6a58cc3fb749abeafbe5bd (diff)
parentf840da757f1e40c18b4627274046197ad46e4f50 (diff)
downloadrust-d7a8936b78b9073842e46098df1cb73344598389.tar.gz
rust-d7a8936b78b9073842e46098df1cb73344598389.zip
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.
-rw-r--r--library/alloc/src/string.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/alloc/src/string.rs b/library/alloc/src/string.rs
index 7c9f13e30ff..2a859ad55ee 100644
--- a/library/alloc/src/string.rs
+++ b/library/alloc/src/string.rs
@@ -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