Skip to content

Commit 796f649

Browse files
author
Andronik Ordian
committed
fix compilation
1 parent bc18e7f commit 796f649

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,15 @@ unsafe impl GlobalAlloc for MiMalloc {
9494

9595
#[inline]
9696
unsafe fn dealloc(&self, ptr: *mut u8, _layout: Layout) {
97-
mi_free(ptr as *const c_void);
97+
mi_free(ptr as *mut c_void);
9898
}
9999

100100
#[inline]
101101
unsafe fn realloc(&self, ptr: *mut u8, layout: Layout, new_size: usize) -> *mut u8 {
102102
if layout.align() <= MIN_ALIGN && layout.align() <= layout.size() {
103-
mi_realloc(ptr as *const c_void, new_size) as *mut u8
103+
mi_realloc(ptr as *mut c_void, new_size) as *mut u8
104104
} else {
105-
mi_realloc_aligned(ptr as *const c_void, new_size, layout.align()) as *mut u8
105+
mi_realloc_aligned(ptr as *mut c_void, new_size, layout.align()) as *mut u8
106106
}
107107
}
108108
}

0 commit comments

Comments
 (0)