heap_remove, sp_brightness_grid_into_packet
This commit is contained in:
parent
ce70ecd9e2
commit
1e442012be
6 changed files with 42 additions and 13 deletions
|
|
@ -61,5 +61,9 @@ pub(crate) fn heap_move_nonnull<T>(x: T) -> NonNull<T> {
|
|||
}
|
||||
|
||||
pub(crate) unsafe fn heap_drop<T>(x: NonNull<T>) {
|
||||
drop(unsafe { Box::from_raw(x.as_ptr()) });
|
||||
drop(unsafe { heap_remove(x) });
|
||||
}
|
||||
|
||||
pub(crate) unsafe fn heap_remove<T>(x: NonNull<T>) -> T {
|
||||
unsafe { *Box::from_raw(x.as_ptr()) }
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue