From 1ba885113af527a3034c8414c288da845ac5c84d Mon Sep 17 00:00:00 2001 From: Ryan Lopopolo Date: Sun, 27 Mar 2022 06:53:55 -0700 Subject: [PATCH] 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. --- library/alloc/src/string.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. ///