Use constant instead of removed const_in_array_repeat_expressions feature

This commit is contained in:
Philipp Oppermann
2021-02-02 11:32:18 +01:00
parent 380e54d6b8
commit 63be7cda6b
2 changed files with 2 additions and 2 deletions

View File

@@ -31,8 +31,9 @@ pub struct FixedSizeBlockAllocator {
impl FixedSizeBlockAllocator {
/// Creates an empty FixedSizeBlockAllocator.
pub const fn new() -> Self {
const EMPTY: Option<&'static mut ListNode> = None;
FixedSizeBlockAllocator {
list_heads: [None; BLOCK_SIZES.len()],
list_heads: [EMPTY; BLOCK_SIZES.len()],
fallback_allocator: linked_list_allocator::Heap::empty(),
}
}