Skip to content

Commit 1ba8851

Browse files
committed
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.
1 parent e7825f2 commit 1ba8851

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/alloc/src/string.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1038,7 +1038,7 @@ impl String {
10381038
}
10391039

10401040
/// Tries to reserve the minimum capacity for exactly `additional` more elements to
1041-
/// be inserted in the given `String`. After calling `reserve_exact`,
1041+
/// be inserted in the given `String`. After calling `try_reserve_exact`,
10421042
/// capacity will be greater than or equal to `self.len() + additional`.
10431043
/// Does nothing if the capacity is already sufficient.
10441044
///

0 commit comments

Comments
 (0)