mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 14:27:49 +00:00
Fix dummy allocator code example (#728)
We forgot to remove the `allocator::` prefix when moving the ALLOCATOR declaration into the `allocator` module.
This commit is contained in:
committed by
GitHub
parent
0c67111e68
commit
6a56ea242f
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user