Rollup merge of #103719 - joseluis:fix-typos-try-reserve, r=the8472
fix typo in `try_reserve` method from `HashMap` and `HashSet` Currently refers to the `reserve` method, instead of `try_reserve`. Other collections like [Vec](https://doc.rust-lang.org/std/vec/struct.Vec.html#method.try_reserve) & [VecDeque](https://doc.rust-lang.org/std/collections/vec_deque/struct.VecDeque.html#method.try_reserve) shows it well.
This commit is contained in:
commit
6425764045
@ -759,7 +759,7 @@ where
|
||||
|
||||
/// Tries to reserve capacity for at least `additional` more elements to be inserted
|
||||
/// in the `HashMap`. The collection may reserve more space to speculatively
|
||||
/// avoid frequent reallocations. After calling `reserve`,
|
||||
/// avoid frequent reallocations. After calling `try_reserve`,
|
||||
/// capacity will be greater than or equal to `self.len() + additional` if
|
||||
/// it returns `Ok(())`.
|
||||
/// Does nothing if capacity is already sufficient.
|
||||
|
@ -462,7 +462,7 @@ where
|
||||
|
||||
/// Tries to reserve capacity for at least `additional` more elements to be inserted
|
||||
/// in the `HashSet`. The collection may reserve more space to speculatively
|
||||
/// avoid frequent reallocations. After calling `reserve`,
|
||||
/// avoid frequent reallocations. After calling `try_reserve`,
|
||||
/// capacity will be greater than or equal to `self.len() + additional` if
|
||||
/// it returns `Ok(())`.
|
||||
/// Does nothing if capacity is already sufficient.
|
||||
|
Loading…
x
Reference in New Issue
Block a user