From 84abc4ddcb6c5bfd2a3b3e68ac6ee935872a0d4e Mon Sep 17 00:00:00 2001 From: Atsukoro1 Date: Fri, 2 Dec 2022 22:50:57 +0100 Subject: [PATCH] =?UTF-8?q?style:=20=F0=9F=92=84=20Formating=20'use'=20cas?= =?UTF-8?q?es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/system/host.rs | 10 +++++----- src/system/net.rs | 9 ++++++--- src/system/specs.rs | 11 +++++++---- 3 files changed, 18 insertions(+), 12 deletions(-) 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 {