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.
This commit is contained in:
Ryan Lopopolo 2022-03-27 06:53:55 -07:00
parent e7825f2b69
commit 1ba885113a
No known key found for this signature in database
GPG Key ID: 46047D739B6AE0B1

View File

@ -1038,7 +1038,7 @@ impl String {
} }
/// Tries to reserve the minimum capacity for exactly `additional` more elements to /// 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`. /// capacity will be greater than or equal to `self.len() + additional`.
/// Does nothing if the capacity is already sufficient. /// Does nothing if the capacity is already sufficient.
/// ///