File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ extern crate alloc;
5454extern crate cortex_m;
5555extern crate linked_list_allocator;
5656
57- use core:: alloc:: { GlobalAlloc , Layout , Opaque } ;
57+ use core:: alloc:: { GlobalAlloc , Layout } ;
5858use core:: ptr:: NonNull ;
5959
6060use cortex_m:: interrupt:: Mutex ;
@@ -104,14 +104,14 @@ impl CortexMHeap {
104104}
105105
106106unsafe impl GlobalAlloc for CortexMHeap {
107- unsafe fn alloc ( & self , layout : Layout ) -> * mut Opaque {
107+ unsafe fn alloc ( & self , layout : Layout ) -> * mut u8 {
108108 self . heap
109109 . lock ( |heap| heap. allocate_first_fit ( layout) )
110110 . ok ( )
111- . map_or ( 0 as * mut Opaque , |allocation| allocation. as_ptr ( ) )
111+ . map_or ( 0 as * mut u8 , |allocation| allocation. as_ptr ( ) )
112112 }
113113
114- unsafe fn dealloc ( & self , ptr : * mut Opaque , layout : Layout ) {
114+ unsafe fn dealloc ( & self , ptr : * mut u8 , layout : Layout ) {
115115 self . heap
116116 . lock ( |heap| heap. deallocate ( NonNull :: new_unchecked ( ptr) , layout) ) ;
117117 }
You can’t perform that action at this time.
0 commit comments