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:
Nick Fitzgerald
2022-08-09 13:17:43 -07:00
committed by GitHub
parent bd70dbebbd
commit b17a734a57

View File

@@ -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));
}
}