From e774b7db0299d0f8e92a11461a8553d9931df351 Mon Sep 17 00:00:00 2001 From: Amanieu d'Antras Date: Fri, 20 Sep 2024 12:09:01 +0100 Subject: [PATCH] Address review comments --- src/map.rs | 2 +- src/set.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/map.rs b/src/map.rs index 264d500f3..69355921a 100644 --- a/src/map.rs +++ b/src/map.rs @@ -1783,7 +1783,7 @@ where /// /// However this operation is still unsafe because the resulting `HashMap` /// may be passed to unsafe code which does expect the map to behave - /// correctly, and would could unsoundness as a result. + /// correctly, and would cause unsoundness as a result. /// /// # Examples /// diff --git a/src/set.rs b/src/set.rs index 3c59076b1..249364455 100644 --- a/src/set.rs +++ b/src/set.rs @@ -1127,9 +1127,9 @@ where /// /// # Safety /// - /// This operation is safe if a key does not exist in the set. + /// This operation is safe if a value does not exist in the set. /// - /// However, if a key exists in the set already, the behavior is unspecified: + /// However, if a value exists in the set already, the behavior is unspecified: /// this operation may panic, loop forever, or any following operation with the set /// may panic, loop forever or return arbitrary result. /// @@ -1138,7 +1138,7 @@ where /// /// However this operation is still unsafe because the resulting `HashSet` /// may be passed to unsafe code which does expect the set to behave - /// correctly, and would could unsoundness as a result. + /// correctly, and would cause unsoundness as a result. #[cfg_attr(feature = "inline-more", inline)] pub unsafe fn insert_unique_unchecked(&mut self, value: T) -> &T { self.map.insert_unique_unchecked(value, ()).0