removed unused imports

This commit is contained in:
2025-08-02 16:22:48 +02:00
parent e736f78c3e
commit d440673354

View File

@@ -467,10 +467,15 @@ fn get_cpu_temp() -> Option<f32> {
None
}
#[cfg(target_os = "windows")]
fn failed(hr: winapi::shared::winerror::HRESULT) -> bool {
hr < 0
}
#[cfg(target_os = "windows")]
{
use com::runtime::init_runtime;
use com::sys::{CLSCTX_INPROC_SERVER, FAILED};
use com::sys::CLSCTX_INPROC_SERVER;
use widestring::U16CString;
use winapi::shared::rpcdce::*;
use winapi::shared::wtypes::VT_I4;
@@ -566,7 +571,7 @@ fn get_cpu_temp() -> Option<f32> {
&mut returned,
);
if FAILED(hr) {
if failed(hr) {
eprintln!("Failed to enumerate WMI objects (HRESULT: {})", hr);
(*enumerator).Release();
continue;