removed unused imports
This commit is contained in:
@@ -5,8 +5,8 @@
|
|||||||
use nvml_wrapper::Nvml;
|
use nvml_wrapper::Nvml;
|
||||||
use reqwest::{Client, StatusCode};
|
use reqwest::{Client, StatusCode};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use std::{any::Any, error::Error, fs, process::Command, time::Duration};
|
use std::{error::Error, time::Duration};
|
||||||
use sysinfo::{Components, Disks, Networks, System};
|
use sysinfo::{Components, Disks, System};
|
||||||
use tokio::time::{interval, sleep, Instant};
|
use tokio::time::{interval, sleep, Instant};
|
||||||
|
|
||||||
// Windows specific imports
|
// Windows specific imports
|
||||||
@@ -470,7 +470,7 @@ fn get_cpu_temp() -> Option<f32> {
|
|||||||
#[cfg(target_os = "windows")]
|
#[cfg(target_os = "windows")]
|
||||||
{
|
{
|
||||||
use com::runtime::init_runtime;
|
use com::runtime::init_runtime;
|
||||||
use com::sys::{CLSCTX_INPROC_SERVER, COINIT_MULTITHREADED, FAILED};
|
use com::sys::{CLSCTX_INPROC_SERVER, FAILED};
|
||||||
use widestring::U16CString;
|
use widestring::U16CString;
|
||||||
use winapi::shared::rpcdce::*;
|
use winapi::shared::rpcdce::*;
|
||||||
use winapi::shared::wtypes::VT_I4;
|
use winapi::shared::wtypes::VT_I4;
|
||||||
@@ -712,7 +712,7 @@ fn get_network_traffic() -> Option<(u64, u64)> {
|
|||||||
#[cfg(target_os = "windows")]
|
#[cfg(target_os = "windows")]
|
||||||
{
|
{
|
||||||
use std::ptr::null_mut;
|
use std::ptr::null_mut;
|
||||||
use winapi::shared::ifmib::{MIB_IFROW, MIB_IFTABLE};
|
use winapi::shared::ifmib::MIB_IFTABLE;
|
||||||
use winapi::um::iphlpapi::GetIfTable;
|
use winapi::um::iphlpapi::GetIfTable;
|
||||||
|
|
||||||
unsafe {
|
unsafe {
|
||||||
@@ -818,7 +818,6 @@ async fn main() -> Result<(), Box<dyn Error>> {
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use tokio::runtime::Runtime;
|
|
||||||
|
|
||||||
// Test CPU temperature collection
|
// Test CPU temperature collection
|
||||||
#[test]
|
#[test]
|
||||||
|
Reference in New Issue
Block a user