From 2cfa13a48fce79b999289a51c245b03cc1e59522 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Wed, 15 Jan 2020 18:13:43 +0100 Subject: [PATCH] Add missing imports --- .../second-edition/posts/11-allocator-designs/index.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/blog/content/second-edition/posts/11-allocator-designs/index.md b/blog/content/second-edition/posts/11-allocator-designs/index.md index a8d5d532..de3601c3 100644 --- a/blog/content/second-edition/posts/11-allocator-designs/index.md +++ b/blog/content/second-edition/posts/11-allocator-designs/index.md @@ -1061,7 +1061,11 @@ TODO graphic The implementation of the `dealloc` method looks like this: ```rust -// in `impl` block in src/allocator/fixed_size_block.rs +// in src/allocator/fixed_size_block.rs + +use core::{mem, ptr::NonNull}; + +// inside the `unsafe impl GlobalAlloc` block #[allow(unused_unsafe)] unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) {