Skip to content

Commit aa48d77

Browse files
Merge #54
54: fix: remove usage of HEAP mut ref in example r=adamgreig a=wcampbell0x2a Remove &mut and just use .as_ptr() as the function requires Co-authored-by: wcampbell <[email protected]>
2 parents a1be51e + 5d404a8 commit aa48d77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/global_alloc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ fn main() -> ! {
2020
use core::mem::MaybeUninit;
2121
const HEAP_SIZE: usize = 1024;
2222
static mut HEAP: [MaybeUninit<u8>; HEAP_SIZE] = [MaybeUninit::uninit(); HEAP_SIZE];
23-
unsafe { ALLOCATOR.init((&mut HEAP).as_ptr() as usize, HEAP_SIZE) }
23+
unsafe { ALLOCATOR.init(HEAP.as_ptr() as usize, HEAP_SIZE) }
2424
}
2525

2626
let mut xs = Vec::new();

0 commit comments

Comments
 (0)