diff options
| author | joseLuís <joseluis@andamira.net> | 2022-10-29 10:49:53 +0200 |
|---|---|---|
| committer | joseLuís <joseluis@andamira.net> | 2022-10-29 11:01:06 +0200 |
| commit | 4b353132f53b6b06c2eda7691a4b007838b1f013 (patch) | |
| tree | 851e3198d4a08216643666873c0532528baec97f | |
| parent | 33b55ac39fa633d0983fad014469e1036669bf28 (diff) | |
| download | rust-4b353132f53b6b06c2eda7691a4b007838b1f013.tar.gz rust-4b353132f53b6b06c2eda7691a4b007838b1f013.zip | |
fix typo in hashmap and hashset try_reserve method
| -rw-r--r-- | library/std/src/collections/hash/map.rs | 2 | ||||
| -rw-r--r-- | library/std/src/collections/hash/set.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/collections/hash/map.rs b/library/std/src/collections/hash/map.rs index 34983b976e3..708edc5de47 100644 --- a/library/std/src/collections/hash/map.rs +++ b/library/std/src/collections/hash/map.rs @@ -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. diff --git a/library/std/src/collections/hash/set.rs b/library/std/src/collections/hash/set.rs index c36eeae3388..cee884145c7 100644 --- a/library/std/src/collections/hash/set.rs +++ b/library/std/src/collections/hash/set.rs @@ -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. |
