diff --git a/boreal/src/module/pe.rs b/boreal/src/module/pe.rs index 2382d029..9a3ff14b 100644 --- a/boreal/src/module/pe.rs +++ b/boreal/src/module/pe.rs @@ -50,7 +50,8 @@ impl Module for Pe { fn get_static_values(&self) -> HashMap<&'static str, StaticValue> { #[allow(clippy::cast_possible_wrap)] - [ + #[allow(clippy::large_stack_arrays)] + HashMap::from([ ( "MACHINE_UNKNOWN", StaticValue::Integer(pe::IMAGE_FILE_MACHINE_UNKNOWN.into()), @@ -823,8 +824,7 @@ impl Module for Pe { Type::Integer, ), ), - ] - .into() + ]) } fn get_dynamic_types(&self) -> HashMap<&'static str, Type> { diff --git a/boreal/src/scanner/process/sys/windows.rs b/boreal/src/scanner/process/sys/windows.rs index 1708c490..c14d4b81 100644 --- a/boreal/src/scanner/process/sys/windows.rs +++ b/boreal/src/scanner/process/sys/windows.rs @@ -53,7 +53,7 @@ pub fn process_memory(pid: u32) -> Result, ScanError> // Safety: // - The handle is valid since the call to OpenProcess succeeded // - The handle must be closed with `CloseHandle`. - let handle = unsafe { OwnedHandle::from_raw_handle(res as _) }; + let handle = unsafe { OwnedHandle::from_raw_handle(res.cast()) }; Ok(Box::new(WindowsProcessMemory { handle,