Skip to content

Commit eca2531

Browse files
authored
Rollup merge of #95368 - lopopolo:lopopolo/string-try-reserve-exact-doc-typo, r=Dylan-DPC
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.
2 parents 1367ede + 1ba8851 commit eca2531

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/alloc/src/string.rs

+1-1
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)