We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4368aa4 commit 2693d12Copy full SHA for 2693d12
src/raw/mod.rs
@@ -357,7 +357,8 @@ impl<T> RawTable<T> {
357
pub fn new() -> Self {
358
Self {
359
data: NonNull::dangling(),
360
- ctrl: NonNull::from(&Group::static_empty()[0]),
+ // Be careful to cast the entire slice to a raw pointer.
361
+ ctrl: unsafe { NonNull::new_unchecked(Group::static_empty().as_ptr() as *mut u8) },
362
bucket_mask: 0,
363
items: 0,
364
growth_left: 0,
0 commit comments