Fix unused result that is #[must_use] (#4663)
Fixes this compiler warning:
```
warning: unused return value of `Box::<T>::from_raw` that must be used
--> crates/bench-api/src/lib.rs:351:9
|
351 | Box::from_raw(state as *mut BenchState);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
```
This commit is contained in:
@@ -348,7 +348,7 @@ pub extern "C" fn wasm_bench_create(
|
||||
pub extern "C" fn wasm_bench_free(state: *mut c_void) {
|
||||
assert!(!state.is_null());
|
||||
unsafe {
|
||||
Box::from_raw(state as *mut BenchState);
|
||||
drop(Box::from_raw(state as *mut BenchState));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user