diff --git a/rust/plugin_wasm/src/model/c_api.rs b/rust/plugin_wasm/src/model/c_api.rs index a432b593..c3816d0b 100644 --- a/rust/plugin_wasm/src/model/c_api.rs +++ b/rust/plugin_wasm/src/model/c_api.rs @@ -733,7 +733,7 @@ pub unsafe extern "C" fn nanoemApplicationPluginModelIODestroy( plugin: *mut nanoem_application_plugin_model_io_t, ) { if !plugin.is_null() { - let _ = Box::from_raw(plugin); + let _ = unsafe { Box::from_raw(plugin) }; } } diff --git a/rust/plugin_wasm/src/motion/c_api.rs b/rust/plugin_wasm/src/motion/c_api.rs index 115a2368..93f08491 100644 --- a/rust/plugin_wasm/src/motion/c_api.rs +++ b/rust/plugin_wasm/src/motion/c_api.rs @@ -714,7 +714,7 @@ pub unsafe extern "C" fn nanoemApplicationPluginMotionIODestroy( plugin: *mut nanoem_application_plugin_motion_io_t, ) { if !plugin.is_null() { - let _ = Box::from_raw(plugin); + let _ = unsafe { Box::from_raw(plugin) }; } } diff --git a/rust/plugin_wasm_test_model_full/src/lib.rs b/rust/plugin_wasm_test_model_full/src/lib.rs index a8f568a7..38444d58 100644 --- a/rust/plugin_wasm_test_model_full/src/lib.rs +++ b/rust/plugin_wasm_test_model_full/src/lib.rs @@ -804,7 +804,7 @@ pub unsafe extern "C" fn nanoemApplicationPluginModelIODestroy( .unwrap() ); if !plugin.is_null() { - let _ = Box::from_raw(plugin); + let _ = unsafe { Box::from_raw(plugin) }; } } diff --git a/rust/plugin_wasm_test_model_minimum/src/lib.rs b/rust/plugin_wasm_test_model_minimum/src/lib.rs index 76599323..02fa82d2 100644 --- a/rust/plugin_wasm_test_model_minimum/src/lib.rs +++ b/rust/plugin_wasm_test_model_minimum/src/lib.rs @@ -319,7 +319,7 @@ pub unsafe extern "C" fn nanoemApplicationPluginModelIODestroy( .unwrap() ); if !plugin.is_null() { - let _ = Box::from_raw(plugin); + let _ = unsafe { Box::from_raw(plugin) }; } } diff --git a/rust/plugin_wasm_test_motion_full/src/lib.rs b/rust/plugin_wasm_test_motion_full/src/lib.rs index e9d9aa3b..f3a7ebe8 100644 --- a/rust/plugin_wasm_test_motion_full/src/lib.rs +++ b/rust/plugin_wasm_test_motion_full/src/lib.rs @@ -785,7 +785,7 @@ pub unsafe extern "C" fn nanoemApplicationPluginMotionIODestroy( .unwrap() ); if !plugin.is_null() { - let _ = Box::from_raw(plugin); + let _ = unsafe { Box::from_raw(plugin) }; } } diff --git a/rust/plugin_wasm_test_motion_minimum/src/lib.rs b/rust/plugin_wasm_test_motion_minimum/src/lib.rs index 402689d7..b8766754 100644 --- a/rust/plugin_wasm_test_motion_minimum/src/lib.rs +++ b/rust/plugin_wasm_test_motion_minimum/src/lib.rs @@ -337,7 +337,7 @@ pub unsafe extern "C" fn nanoemApplicationPluginMotionIODestroy( .unwrap() ); if !plugin.is_null() { - let _ = Box::from_raw(plugin); + let _ = unsafe { Box::from_raw(plugin) }; } }