From 1bcbc00fd3820df0095abfb44cccca436d8b369d Mon Sep 17 00:00:00 2001 From: Elias <1elias.bauer@gmail.com> Date: Sat, 11 Jan 2025 12:03:13 +0100 Subject: [PATCH] Fix some typos --- src/hash_map.rs | 8 ++++---- src/hash_set.rs | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/hash_map.rs b/src/hash_map.rs index 2b6fbdc..ac30776 100644 --- a/src/hash_map.rs +++ b/src/hash_map.rs @@ -51,13 +51,13 @@ impl Into> for AHashMap { } impl AHashMap { - /// This crates a hashmap using [RandomState::new] which obtains its keys from [RandomSource]. + /// This creates a hashmap using [RandomState::new] which obtains its keys from [RandomSource]. /// See the documentation in [RandomSource] for notes about key strength. pub fn new() -> Self { AHashMap(HashMap::with_hasher(RandomState::new())) } - /// This crates a hashmap with the specified capacity using [RandomState::new]. + /// This creates a hashmap with the specified capacity using [RandomState::new]. /// See the documentation in [RandomSource] for notes about key strength. pub fn with_capacity(capacity: usize) -> Self { AHashMap(HashMap::with_capacity_and_hasher(capacity, RandomState::new())) @@ -348,7 +348,7 @@ impl FromIterator<(K, V)> for AHashMap where K: Eq + Hash, { - /// This crates a hashmap from the provided iterator using [RandomState::new]. + /// This creates a hashmap from the provided iterator using [RandomState::new]. /// See the documentation in [RandomSource] for notes about key strength. fn from_iter>(iter: T) -> Self { let mut inner = HashMap::with_hasher(RandomState::new()); @@ -404,7 +404,7 @@ where } } -/// NOTE: For safety this trait impl is only available available if either of the flags `runtime-rng` (on by default) or +/// NOTE: For safety this trait impl is only available if either of the flags `runtime-rng` (on by default) or /// `compile-time-rng` are enabled. This is to prevent weakly keyed maps from being accidentally created. Instead one of /// constructors for [RandomState] must be used. #[cfg(any(feature = "compile-time-rng", feature = "runtime-rng", feature = "no-rng"))] diff --git a/src/hash_set.rs b/src/hash_set.rs index d03bef5..e12d8b0 100644 --- a/src/hash_set.rs +++ b/src/hash_set.rs @@ -47,13 +47,13 @@ impl Into> for AHashSet { } impl AHashSet { - /// This crates a hashset using [RandomState::new]. + /// This creates a hashset using [RandomState::new]. /// See the documentation in [RandomSource] for notes about key strength. pub fn new() -> Self { AHashSet(HashSet::with_hasher(RandomState::new())) } - /// This crates a hashset with the specified capacity using [RandomState::new]. + /// This craetes a hashset with the specified capacity using [RandomState::new]. /// See the documentation in [RandomSource] for notes about key strength. pub fn with_capacity(capacity: usize) -> Self { AHashSet(HashSet::with_capacity_and_hasher(capacity, RandomState::new())) @@ -245,7 +245,7 @@ impl FromIterator for AHashSet where T: Eq + Hash, { - /// This crates a hashset from the provided iterator using [RandomState::new]. + /// This creates a hashset from the provided iterator using [RandomState::new]. /// See the documentation in [RandomSource] for notes about key strength. #[inline] fn from_iter>(iter: I) -> AHashSet {