diff --git a/ffi/src/state.rs b/ffi/src/state.rs index e146a28..fbbc63e 100644 --- a/ffi/src/state.rs +++ b/ffi/src/state.rs @@ -66,7 +66,7 @@ pub unsafe extern "C" fn lci_state_create( #[no_mangle] pub unsafe extern "C" fn lci_state_destroy(state: *mut lci_state) { if !state.is_null() { - Box::from_raw(state); + drop(Box::from_raw(state)); } } diff --git a/src/lib.rs b/src/lib.rs index df96d3d..82ce601 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -39,12 +39,10 @@ pub enum GameType { impl GameType { fn supports_light_plugins(self) -> bool { - match self { - GameType::SkyrimSE | GameType::SkyrimVR | GameType::Fallout4 | GameType::Fallout4VR => { - true - } - _ => false, - } + matches!( + self, + GameType::SkyrimSE | GameType::SkyrimVR | GameType::Fallout4 | GameType::Fallout4VR + ) } }