about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJirCep <uzivatel919@seznam.cz>2024-04-27 16:57:20 +0200
committerJirCep <uzivatel919@seznam.cz>2024-04-27 16:57:20 +0200
commit825a3b1f09c1b2598aa9a0fdabe5ad051e5e1c98 (patch)
treee14c0a40d756e3714e92d63b6e5edcbd129d331b
parent261823eee7021ae24e282e2ca28dbbd3d287b10f (diff)
downloadrust-825a3b1f09c1b2598aa9a0fdabe5ad051e5e1c98.tar.gz
rust-825a3b1f09c1b2598aa9a0fdabe5ad051e5e1c98.zip
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..414486ed75f 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