alloc: Use intra doc links for the reserve function
The sentence exists to highlight the existence of a performance footgun of repeated calls of the reserve_exact function.
This commit is contained in:
parent
25b7648496
commit
1db8737f65
4 changed files with 15 additions and 5 deletions
|
@ -811,7 +811,9 @@ impl<T, A: Allocator> Vec<T, A> {
|
|||
///
|
||||
/// Note that the allocator may give the collection more space than it
|
||||
/// requests. Therefore, capacity can not be relied upon to be precisely
|
||||
/// minimal. Prefer `reserve` if future insertions are expected.
|
||||
/// minimal. Prefer [`reserve`] if future insertions are expected.
|
||||
///
|
||||
/// [`reserve`]: Vec::reserve
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
|
@ -875,7 +877,9 @@ impl<T, A: Allocator> Vec<T, A> {
|
|||
///
|
||||
/// Note that the allocator may give the collection more space than it
|
||||
/// requests. Therefore, capacity can not be relied upon to be precisely
|
||||
/// minimal. Prefer `reserve` if future insertions are expected.
|
||||
/// minimal. Prefer [`reserve`] if future insertions are expected.
|
||||
///
|
||||
/// [`reserve`]: Vec::reserve
|
||||
///
|
||||
/// # Errors
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue