diff --git a/build.rs b/build.rs index 051e233..932c475 100644 --- a/build.rs +++ b/build.rs @@ -6,10 +6,6 @@ // notice may not be copied, modified, or distributed except // according to those terms. -#[macro_use] -extern crate clap; -extern crate version_check; - use clap::Shell; use std::fs; use std::io::{self, Write}; diff --git a/src/app.rs b/src/app.rs index 89f0736..ef34814 100644 --- a/src/app.rs +++ b/src/app.rs @@ -7,7 +7,7 @@ // according to those terms. use std::collections::HashMap; -use clap::{App, AppSettings, Arg}; +use clap::{crate_version, App, AppSettings, Arg}; struct Help { short: &'static str, diff --git a/src/exec/job.rs b/src/exec/job.rs index a565ce8..56d6966 100644 --- a/src/exec/job.rs +++ b/src/exec/job.rs @@ -7,10 +7,10 @@ // according to those terms. use super::CommandTemplate; +use crate::walk::WorkerResult; use std::path::PathBuf; use std::sync::mpsc::Receiver; use std::sync::{Arc, Mutex}; -use crate::walk::WorkerResult; /// An event loop that listens for inputs from the `rx` receiver. Each received input will /// generate a command with the supplied command template. The generated command will then diff --git a/src/exec/mod.rs b/src/exec/mod.rs index 6b58661..8f335e4 100644 --- a/src/exec/mod.rs +++ b/src/exec/mod.rs @@ -17,6 +17,7 @@ use std::path::{Path, PathBuf}; use std::process::{Command, Stdio}; use std::sync::{Arc, Mutex}; +use lazy_static::lazy_static; use regex::Regex; use self::command::execute_command; diff --git a/src/internal/filter/size.rs b/src/internal/filter/size.rs index c24c078..b534f8d 100644 --- a/src/internal/filter/size.rs +++ b/src/internal/filter/size.rs @@ -1,3 +1,4 @@ +use lazy_static::lazy_static; use regex::Regex; lazy_static! { diff --git a/src/main.rs b/src/main.rs index 108292b..571bdc6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,21 +6,6 @@ // notice may not be copied, modified, or distributed except // according to those terms. -extern crate ansi_term; -extern crate atty; -#[macro_use] -extern crate clap; -extern crate ignore; -#[macro_use] -extern crate lazy_static; -extern crate humantime; -#[cfg(all(unix, not(target_os = "redox")))] -extern crate libc; -extern crate lscolors; -extern crate num_cpus; -extern crate regex; -extern crate regex_syntax; - #[macro_use] mod internal; diff --git a/src/walk.rs b/src/walk.rs index 2bb3fd6..efcc4ee 100644 --- a/src/walk.rs +++ b/src/walk.rs @@ -6,8 +6,6 @@ // notice may not be copied, modified, or distributed except // according to those terms. -extern crate ctrlc; - use crate::exec; use crate::exit_codes::ExitCode; use crate::fshelper; diff --git a/tests/testenv/mod.rs b/tests/testenv/mod.rs index 1a6f9d9..ba9d075 100644 --- a/tests/testenv/mod.rs +++ b/tests/testenv/mod.rs @@ -20,10 +20,7 @@ use std::os::unix; #[cfg(windows)] use std::os::windows; -extern crate diff; -extern crate tempdir; - -use self::tempdir::TempDir; +use tempdir::TempDir; /// Environment for the integration tests. pub struct TestEnv { diff --git a/tests/tests.rs b/tests/tests.rs index d6f688a..d03168f 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -8,18 +8,14 @@ //! Integration tests for the CLI interface of fd. -extern crate filetime; -extern crate humantime; -extern crate regex; - 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 crate::testenv::TestEnv; static DEFAULT_DIRS: &'static [&'static str] = &["one/two/three", "one/two/three/directory_foo"];