File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1010
1111use core:: alloc:: { GlobalAlloc , Layout } ;
1212use core:: cell:: RefCell ;
13- use core:: ptr:: NonNull ;
13+ use core:: ptr:: { self , NonNull } ;
1414
1515use cortex_m:: interrupt:: Mutex ;
1616use linked_list_allocator:: Heap ;
@@ -47,7 +47,7 @@ impl CortexMHeap {
4747 /// - The size of the heap is `(end_addr as usize) - (start_addr as usize)`. The
4848 /// allocator won't use the byte at `end_addr`.
4949 ///
50- /// # Unsafety
50+ /// # Safety
5151 ///
5252 /// Obey these or Bad Stuff will happen.
5353 ///
@@ -78,7 +78,7 @@ unsafe impl GlobalAlloc for CortexMHeap {
7878 . borrow_mut ( )
7979 . allocate_first_fit ( layout)
8080 . ok ( )
81- . map_or ( 0 as * mut u8 , |allocation| allocation. as_ptr ( ) )
81+ . map_or ( ptr :: null_mut ( ) , |allocation| allocation. as_ptr ( ) )
8282 } )
8383 }
8484
You can’t perform that action at this time.
0 commit comments