Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 4679f9a

Browse files
committedJul 14, 2024
std: Unsafe-wrap HashMap::get_many_unchecked_mut
1 parent ac0fd27 commit 4679f9a

File tree

1 file changed

+1
-3
lines changed
  • std/src/collections/hash

1 file changed

+1
-3
lines changed
 

‎std/src/collections/hash/map.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![allow(unsafe_op_in_unsafe_fn)]
2-
31
#[cfg(test)]
42
mod tests;
53

@@ -1020,7 +1018,7 @@ where
10201018
K: Borrow<Q>,
10211019
Q: Hash + Eq,
10221020
{
1023-
self.base.get_many_unchecked_mut(ks)
1021+
unsafe { self.base.get_many_unchecked_mut(ks) }
10241022
}
10251023

10261024
/// Returns `true` if the map contains a value for the specified key.

0 commit comments

Comments
 (0)
Failed to load comments.