From 4679f9a6cff7886dd3a53067920aaf88ccd53931 Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Sun, 14 Jul 2024 16:49:02 -0700 Subject: [PATCH] std: Unsafe-wrap HashMap::get_many_unchecked_mut --- std/src/collections/hash/map.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/std/src/collections/hash/map.rs b/std/src/collections/hash/map.rs index 955f4013ab652..1f6a3e904795a 100644 --- a/std/src/collections/hash/map.rs +++ b/std/src/collections/hash/map.rs @@ -1,5 +1,3 @@ -#![allow(unsafe_op_in_unsafe_fn)] - #[cfg(test)] mod tests; @@ -1020,7 +1018,7 @@ where K: Borrow, Q: Hash + Eq, { - self.base.get_many_unchecked_mut(ks) + unsafe { self.base.get_many_unchecked_mut(ks) } } /// Returns `true` if the map contains a value for the specified key.