Skip to content

Commit c211244

Browse files
committed
fix: update for WMI v0.18.0 compatibility (COMLibrary removed)
1 parent 70c1554 commit c211244

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/core/src/wasm_runtime/runtime.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ fn get_cpu_cycles_per_second_runtime() -> Option<u64> {
452452
#[cfg(target_os = "windows")]
453453
fn get_cpu_cycles_per_second_runtime() -> Option<u64> {
454454
use serde::Deserialize;
455-
use wmi::{WMIConnection};
455+
use wmi::WMIConnection;
456456

457457
#[derive(Deserialize, Debug)]
458458
struct Win32Processor {
@@ -463,7 +463,7 @@ fn get_cpu_cycles_per_second_runtime() -> Option<u64> {
463463
let wmi_con = WMIConnection::new().ok()?;
464464

465465
let results: Vec<Win32Processor> = wmi_con
466-
.raw_query("SELECT MaxClockSpeed FROM Win32Processor")
466+
.raw_query("SELECT MaxClockSpeed FROM Win32_Processor")
467467
.ok()?;
468468

469469
if let Some(cpu) = results.first() {

0 commit comments

Comments
 (0)