Skip to content

Commit 71dfb94

Browse files
committed
fixup! Fix allocator
1 parent 998d456 commit 71dfb94

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

framework/src/allocators/cache_aligned.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::alloc::{self, Alloc, Global, Layout, Opaque};
1+
use std::alloc::{self, Alloc, Global, Layout};
22
use std::fmt;
33
use std::mem::size_of;
44
use std::ops::{Deref, DerefMut};
@@ -18,7 +18,7 @@ impl<T: Sized> Drop for CacheAligned<T> {
1818
fn drop(&mut self) {
1919
unsafe {
2020
alloc::Global.dealloc(
21-
NonNull::<Opaque>::new_unchecked(self.ptr.as_ptr() as *mut Opaque),
21+
NonNull::<u8>::new_unchecked(self.ptr.as_ptr() as *mut u8),
2222
Layout::from_size_align(size_of::<T>(), CACHE_LINE_SIZE).unwrap(),
2323
);
2424
}

0 commit comments

Comments
 (0)