]> git.lizzy.rs Git - rust.git/commitdiff
Fix typo in HashMap::with_capacity
authorKiran Shila <me@kiranshila.com>
Sun, 5 Feb 2023 18:13:30 +0000 (10:13 -0800)
committerGitHub <noreply@github.com>
Sun, 5 Feb 2023 18:13:30 +0000 (10:13 -0800)
library/std/src/collections/hash/map.rs

index df490358827e7ae9c8fd777450dc776a19f66b10..742c4cc7c5539d9a4b5175e70d7b3371f3917b64 100644 (file)
@@ -238,7 +238,7 @@ pub fn new() -> HashMap<K, V, RandomState> {
     ///
     /// The hash map will be able to hold at least `capacity` elements without
     /// reallocating. This method is allowed to allocate for more elements than
-    /// `capacity`. If `capacity` is 0, the hash set will not allocate.
+    /// `capacity`. If `capacity` is 0, the hash map will not allocate.
     ///
     /// # Examples
     ///