File tree 1 file changed +4
-4
lines changed 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ extern crate alloc;
54
54
extern crate cortex_m;
55
55
extern crate linked_list_allocator;
56
56
57
- use core:: alloc:: { GlobalAlloc , Layout , Opaque } ;
57
+ use core:: alloc:: { GlobalAlloc , Layout } ;
58
58
use core:: ptr:: NonNull ;
59
59
60
60
use cortex_m:: interrupt:: Mutex ;
@@ -104,14 +104,14 @@ impl CortexMHeap {
104
104
}
105
105
106
106
unsafe impl GlobalAlloc for CortexMHeap {
107
- unsafe fn alloc ( & self , layout : Layout ) -> * mut Opaque {
107
+ unsafe fn alloc ( & self , layout : Layout ) -> * mut u8 {
108
108
self . heap
109
109
. lock ( |heap| heap. allocate_first_fit ( layout) )
110
110
. ok ( )
111
- . map_or ( 0 as * mut Opaque , |allocation| allocation. as_ptr ( ) )
111
+ . map_or ( 0 as * mut u8 , |allocation| allocation. as_ptr ( ) )
112
112
}
113
113
114
- unsafe fn dealloc ( & self , ptr : * mut Opaque , layout : Layout ) {
114
+ unsafe fn dealloc ( & self , ptr : * mut u8 , layout : Layout ) {
115
115
self . heap
116
116
. lock ( |heap| heap. deallocate ( NonNull :: new_unchecked ( ptr) , layout) ) ;
117
117
}
You can’t perform that action at this time.
0 commit comments