Skip to content

Commit 7af0f81

Browse files
Remove unnecessary cast in cabi_dealloc (#991)
1 parent 396d2e7 commit 7af0f81

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/rust/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ pub unsafe fn cabi_dealloc(ptr: *mut u8, size: usize, align: usize) {
386386
return;
387387
}
388388
let layout = alloc::Layout::from_size_align_unchecked(size, align);
389-
alloc::dealloc(ptr as *mut u8, layout);
389+
alloc::dealloc(ptr, layout);
390390
}
391391
",
392392
);

0 commit comments

Comments
 (0)