about summary refs log tree commit diff
path: root/library/alloc/src
diff options
context:
space:
mode:
authorRyan Lopopolo <rjl@hyperbo.la>2022-03-27 06:53:55 -0700
committerRyan Lopopolo <rjl@hyperbo.la>2022-03-27 06:53:55 -0700
commit1ba885113af527a3034c8414c288da845ac5c84d (patch)
treebe0f5292c05a2024f9a1e4aa45341ae4d1888879 /library/alloc/src
parente7825f2b690c9a0d21b6f6d84c404bb53b151b38 (diff)
Fix typo in `String::try_reserve_exact` docs
Copying the pattern from `Vec::try_reserve_exact` and `String::try_reserve`,
it looks like this doc comment is intending to refer to the currently-being-documented
function.
Diffstat (limited to 'library/alloc/src')
-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 7c0faf0659a..30eabcb95ec 100644
--- a/library/alloc/src/string.rs
+++ b/library/alloc/src/string.rs
@@ -1038,7 +1038,7 @@ impl String {
     }
 
     /// Tries to reserve the minimum capacity for exactly `additional` more elements to
-    /// be inserted in the given `String`. After calling `reserve_exact`,
+    /// be inserted in the given `String`. After calling `try_reserve_exact`,
     /// capacity will be greater than or equal to `self.len() + additional`.
     /// Does nothing if the capacity is already sufficient.
     ///