diff --git a/crates/core/src/wasm_runtime/runtime.rs b/crates/core/src/wasm_runtime/runtime.rs index 7db225475..10f12eec1 100644 --- a/crates/core/src/wasm_runtime/runtime.rs +++ b/crates/core/src/wasm_runtime/runtime.rs @@ -452,18 +452,17 @@ fn get_cpu_cycles_per_second_runtime() -> Option { #[cfg(target_os = "windows")] fn get_cpu_cycles_per_second_runtime() -> Option { use serde::Deserialize; - use wmi::{COMLibrary, Variant, WMIConnection}; + use wmi::WMIConnection; #[derive(Deserialize, Debug)] - struct Win32_Processor { + struct Win32Processor { #[serde(rename = "MaxClockSpeed")] max_clock_speed: u64, } - let com_con = COMLibrary::new().ok()?; - let wmi_con = WMIConnection::new(com_con.into()).ok()?; + let wmi_con = WMIConnection::new().ok()?; - let results: Vec = wmi_con + let results: Vec = wmi_con .raw_query("SELECT MaxClockSpeed FROM Win32_Processor") .ok()?;