Skip to content

Commit

Permalink
fix typo in hashmap and hashset try_reserve method
Browse files Browse the repository at this point in the history
  • Loading branch information
joseluis committed Oct 29, 2022
1 parent 33b55ac commit 4b35313
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion library/std/src/collections/hash/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/collections/hash/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 4b35313

Please sign in to comment.