diff options
| author | JirCep <uzivatel919@seznam.cz> | 2024-04-27 16:57:20 +0200 |
|---|---|---|
| committer | JirCep <uzivatel919@seznam.cz> | 2024-04-27 16:57:20 +0200 |
| commit | 825a3b1f09c1b2598aa9a0fdabe5ad051e5e1c98 (patch) | |
| tree | e14c0a40d756e3714e92d63b6e5edcbd129d331b | |
| parent | 261823eee7021ae24e282e2ca28dbbd3d287b10f (diff) | |
| download | rust-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.rs | 2 |
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 |
