mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-01 09:33:26 +00:00
doc: suggest try_reserve in try_reserve_exact
Signed-off-by: TennyZhuang <zty0826@gmail.com>
This commit is contained in:
parent
5e93f6e318
commit
aa3370c92b
@ -720,9 +720,9 @@ impl<T, A: Allocator> VecDeque<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 [`try_reserve`] if future insertions are expected.
|
||||
///
|
||||
/// [`reserve`]: VecDeque::reserve
|
||||
/// [`try_reserve`]: VecDeque::try_reserve
|
||||
///
|
||||
/// # Errors
|
||||
///
|
||||
|
@ -1044,9 +1044,9 @@ impl String {
|
||||
///
|
||||
/// 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 [`try_reserve`] if future insertions are expected.
|
||||
///
|
||||
/// [`reserve`]: String::reserve
|
||||
/// [`try_reserve`]: String::try_reserve
|
||||
///
|
||||
/// # Errors
|
||||
///
|
||||
|
@ -881,9 +881,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 [`try_reserve`] if future insertions are expected.
|
||||
///
|
||||
/// [`reserve`]: Vec::reserve
|
||||
/// [`try_reserve`]: Vec::try_reserve
|
||||
///
|
||||
/// # Errors
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user