diff --git a/build.rs b/build.rs index ad7af7d..f3787c4 100644 --- a/build.rs +++ b/build.rs @@ -1,8 +1,9 @@ -use clap::Shell; use std::fs; use std::io::{self, Write}; use std::process::exit; +use clap::Shell; + include!("src/app.rs"); fn main() { diff --git a/src/main.rs b/src/main.rs index e0e585f..a348281 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,5 @@ -#[macro_use] -mod error; - mod app; +mod error; mod exec; mod exit_codes; mod filesystem; diff --git a/src/options.rs b/src/options.rs index 12fdfc0..d0620c9 100644 --- a/src/options.rs +++ b/src/options.rs @@ -1,9 +1,11 @@ +use std::{path::PathBuf, sync::Arc, time::Duration}; + +use lscolors::LsColors; +use regex::bytes::RegexSet; + use crate::exec::CommandTemplate; use crate::filetypes::FileTypes; use crate::filter::{SizeFilter, TimeFilter}; -use lscolors::LsColors; -use regex::bytes::RegexSet; -use std::{path::PathBuf, sync::Arc, time::Duration}; /// Configuration options for *fd*. pub struct Options { diff --git a/tests/testenv/mod.rs b/tests/testenv/mod.rs index 886b095..3aec1a4 100644 --- a/tests/testenv/mod.rs +++ b/tests/testenv/mod.rs @@ -1,16 +1,12 @@ -use std; use std::env; use std::fs; -use std::io; -use std::io::Write; -use std::path::{Path, PathBuf}; -use std::process; - +use std::io::{self, Write}; #[cfg(unix)] use std::os::unix; - #[cfg(windows)] use std::os::windows; +use std::path::{Path, PathBuf}; +use std::process; use tempdir::TempDir; diff --git a/tests/tests.rs b/tests/tests.rs index f0e09fc..4420561 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -1,14 +1,14 @@ -//! Integration tests for the CLI interface of fd. - mod testenv; -use crate::testenv::TestEnv; -use regex::escape; use std::fs; use std::io::Write; use std::path::Path; use std::time::{Duration, SystemTime}; +use regex::escape; + +use crate::testenv::TestEnv; + static DEFAULT_DIRS: &'static [&'static str] = &["one/two/three", "one/two/three/directory_foo"]; static DEFAULT_FILES: &'static [&'static str] = &[