diff --git a/src/internal/detect.rs b/src/internal/detect.rs index 189c03f..621475c 100644 --- a/src/internal/detect.rs +++ b/src/internal/detect.rs @@ -1,7 +1,7 @@ -use crate::internal::strings::prompt; +use crate::internal::commands::ShellCommand; use crate::internal::error::SilentUnwrap; use crate::internal::exit_code::AppExitCode; -use crate::internal::commands::ShellCommand; +use crate::internal::strings::prompt; pub fn detect() { let mut pacnew = vec![]; @@ -9,7 +9,8 @@ pub fn detect() { for entry in std::fs::read_dir("/etc").unwrap() { let entry = entry.unwrap(); let path = entry.path(); - if path.to_str().unwrap().contains(".pacnew") || path.to_str().unwrap().contains(".pacsave") { + if path.to_str().unwrap().contains(".pacnew") || path.to_str().unwrap().contains(".pacsave") + { pacnew.push(path); } } diff --git a/src/internal/mod.rs b/src/internal/mod.rs index 7f491d9..ca87eca 100644 --- a/src/internal/mod.rs +++ b/src/internal/mod.rs @@ -1,5 +1,6 @@ mod clean; pub mod commands; +mod detect; pub mod error; pub mod exit_code; mod initialise; @@ -7,14 +8,13 @@ pub mod rpc; mod sort; mod strings; pub mod structs; -mod detect; pub use clean::*; +pub use detect::*; pub use initialise::*; pub use sort::*; use std::env; pub use strings::*; -pub use detect::*; #[macro_export] macro_rules! uwu { diff --git a/src/main.rs b/src/main.rs index 6002edf..063209d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,10 +5,10 @@ use args::Args; use internal::commands::ShellCommand; use internal::error::SilentUnwrap; +use crate::internal::detect; use crate::internal::exit_code::AppExitCode; #[allow(unused_imports)] use crate::internal::{crash, info, init, log, prompt, sort, structs::Options, warn}; -use crate::internal::detect; #[global_allocator] static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;