From 6a56ea242fde41e4f82d13be527cc2b7b02273e3 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Tue, 28 Jan 2020 17:10:46 +0100 Subject: [PATCH] Fix dummy allocator code example (#728) We forgot to remove the `allocator::` prefix when moving the ALLOCATOR declaration into the `allocator` module. --- blog/content/second-edition/posts/10-heap-allocation/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog/content/second-edition/posts/10-heap-allocation/index.md b/blog/content/second-edition/posts/10-heap-allocation/index.md index 0bc6eae7a..b5fc949af 100644 --- a/blog/content/second-edition/posts/10-heap-allocation/index.md +++ b/blog/content/second-edition/posts/10-heap-allocation/index.md @@ -309,7 +309,7 @@ The `#[global_allocator]` attribute tells the Rust compiler which allocator inst // in src/allocator.rs #[global_allocator] -static ALLOCATOR: allocator::Dummy = allocator::Dummy; +static ALLOCATOR: Dummy = Dummy; ``` Since the `Dummy` allocator is a [zero sized type], we don't need to specify any fields in the initialization expression.