Experimenting with the LSP
This commit is contained in:
@@ -57,6 +57,12 @@ pub struct SyncArenaAllocator {
|
||||
allocations: Vec<AllocationEntry>,
|
||||
}
|
||||
|
||||
impl SyncArenaAllocator {
|
||||
pub fn reset(&mut self) {
|
||||
self.bump.lock().unwrap().reset();
|
||||
}
|
||||
}
|
||||
|
||||
impl Allocator for SyncArenaAllocator {
|
||||
unsafe fn alloc_unsafe(&self, data: *const u8, layout: Layout, drop_fn: DropFn) -> *mut u8 {
|
||||
unsafe {
|
||||
|
||||
Reference in New Issue
Block a user