removed unused imports
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user