diff --git a/src/system/host.rs b/src/system/host.rs index b0383a8..c87154a 100644 --- a/src/system/host.rs +++ b/src/system/host.rs @@ -1,10 +1,10 @@ -#[cfg(target_os = "linux")] -use crate::helpers::file::file_open; -#[cfg(target_os = "linux")] -use std::{fs::File, io::Read}; - #[cfg(any(target_os = "windows", target_os = "linux"))] use std::process::Command; +#[cfg(target_os = "linux")] +use { + crate::helpers::file::file_open, + std::{fs::File, io::Read}, +}; #[cfg(target_os = "windows")] pub fn get_hostname() -> String { diff --git a/src/system/net.rs b/src/system/net.rs index cbfbc21..199cae1 100644 --- a/src/system/net.rs +++ b/src/system/net.rs @@ -1,7 +1,10 @@ -use crate::helpers::file::file_open; +#[cfg(target_os = "linux")] +use { + crate::helpers::file::file_open, + std::sync::Mutex, + std::ops::Add, +}; use std::process::Command; -use std::sync::Mutex; -use std::ops::Add; #[cfg(target_os = "windows")] pub fn get_ipaddr() -> String { diff --git a/src/system/specs.rs b/src/system/specs.rs index 06b5e2f..9c70f3f 100644 --- a/src/system/specs.rs +++ b/src/system/specs.rs @@ -1,7 +1,10 @@ -use crate::helpers::file::file_open; -use std::fs::File; -use std::io::Read; -use std::rc::Rc; +#[cfg(target_os = "linux")] +use { + crate::helpers::file::file_open, + std::fs::File, + std::io::Read, + std::rc::Rc, +}; #[cfg(target_os = "windows")] pub fn get_cpu() -> String {