Skip to content

Commit 4da165d

Browse files
committed
Implements Default for Allocator
1 parent a8978ba commit 4da165d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,12 @@ impl<K: Kernel> Allocator<K> {
420420
}
421421
}
422422

423+
impl<K: Kernel> Default for Allocator<K> {
424+
fn default() -> Self {
425+
Self::new()
426+
}
427+
}
428+
423429
unsafe impl<K: Kernel> GlobalAlloc for Allocator<K> {
424430
unsafe fn alloc(&self, layout: Layout) -> *mut u8 {
425431
Self::alloc(layout, MallocFlags::WAITOK)

0 commit comments

Comments
 (0)