Skip to content

Commit

Permalink
[2018 edition] remove all extern crate lines from sources
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmaco authored and sharkdp committed Jan 7, 2019
1 parent 630f173 commit 051ff59
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 32 deletions.
4 changes: 0 additions & 4 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/exec/job.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/exec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/internal/filter/size.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use lazy_static::lazy_static;
use regex::Regex;

lazy_static! {
Expand Down
15 changes: 0 additions & 15 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 0 additions & 2 deletions src/walk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 1 addition & 4 deletions tests/testenv/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 1 addition & 5 deletions tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"];

Expand Down

0 comments on commit 051ff59

Please sign in to comment.