mirror of
https://github.com/Lokathor/bytemuck.git
synced 2024-11-21 22:32:23 +00:00
gotta mask that unsafe
This commit is contained in:
parent
cc0a6aa751
commit
28603a3198
@ -48,7 +48,7 @@ pub fn try_zeroed_box<T: Zeroable>() -> Result<Box<T>, ()> {
|
||||
// we don't know what the error is because `alloc_zeroed` is a dumb API
|
||||
Err(())
|
||||
} else {
|
||||
Ok(Box::<T>::from_raw(ptr as *mut T))
|
||||
Ok(unsafe { Box::<T>::from_raw(ptr as *mut T) })
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user