diff --git a/src/allocation.rs b/src/allocation.rs index 644241a..71adb26 100644 --- a/src/allocation.rs +++ b/src/allocation.rs @@ -48,7 +48,7 @@ pub fn try_zeroed_box() -> Result, ()> { // we don't know what the error is because `alloc_zeroed` is a dumb API Err(()) } else { - Box::::from_raw(ptr as *mut T) + Ok(Box::::from_raw(ptr as *mut T)) } }