Run latest version of rustfmt

This commit is contained in:
sharkdp 2018-04-13 22:46:17 +02:00 committed by David Peter
parent f02b3cba6a
commit 6a9f16e159
12 changed files with 27 additions and 28 deletions

View File

@ -11,9 +11,9 @@ extern crate clap;
extern crate version_check;
use clap::Shell;
use std::fs;
use std::io::{self, Write};
use std::process::exit;
use std::fs;
include!("src/app.rs");

View File

@ -16,10 +16,10 @@ struct Help {
}
macro_rules! doc {
($map: expr, $name: expr, $short: expr) => {
($map:expr, $name:expr, $short:expr) => {
doc!($map, $name, $short, $short)
};
($map: expr, $name: expr, $short: expr, $long: expr) => {
($map:expr, $name:expr, $short:expr, $long:expr) => {
$map.insert(
$name,
Help {

View File

@ -6,10 +6,10 @@
// notice may not be copied, modified, or distributed except
// according to those terms.
use std::process::Command;
use std::sync::{Arc, Mutex};
use std::io;
use std::io::Write;
use std::process::Command;
use std::sync::{Arc, Mutex};
/// Executes a command.
pub fn execute_command(mut cmd: Command, out_perm: Arc<Mutex<()>>) {

View File

@ -7,8 +7,8 @@
// according to those terms.
use std::path::PathBuf;
use std::sync::{Arc, Mutex};
use std::sync::mpsc::Receiver;
use std::sync::{Arc, Mutex};
use super::CommandTemplate;

View File

@ -8,9 +8,9 @@
// TODO: Possible optimization could avoid pushing characters on a buffer.
mod command;
mod token;
mod job;
mod input;
mod job;
mod token;
use std::borrow::Cow;
use std::path::Path;
@ -19,10 +19,10 @@ use std::sync::{Arc, Mutex};
use regex::Regex;
use self::input::{basename, dirname, remove_extension};
use self::command::execute_command;
use self::token::Token;
use self::input::{basename, dirname, remove_extension};
pub use self::job::job;
use self::token::Token;
/// Represents a template that is utilized to generate command strings.
///

View File

@ -7,11 +7,11 @@
// according to those terms.
use std::env::current_dir;
use std::path::{Path, PathBuf};
use std::io;
use std::fs;
use std::io;
#[cfg(any(unix, target_os = "redox"))]
use std::os::unix::fs::PermissionsExt;
use std::path::{Path, PathBuf};
pub fn path_absolute_form(path: &Path) -> io::Result<PathBuf> {
if path.is_absolute() {

View File

@ -7,16 +7,16 @@
// according to those terms.
use std::ffi::OsString;
use std::process;
use std::time;
use std::io::Write;
use std::path::PathBuf;
use std::process;
use std::time;
use exec::CommandTemplate;
use lscolors::LsColors;
use regex_syntax::Parser;
use regex_syntax::hir::Hir;
use regex::RegexSet;
use regex_syntax::hir::Hir;
use regex_syntax::Parser;
/// Whether or not to show
pub struct FileTypes {

View File

@ -6,10 +6,9 @@
// notice may not be copied, modified, or distributed except
// according to those terms.
/// A parser for the `LS_COLORS` environment variable.
use std::collections::HashMap;
use ansi_term::{Colour, Style};
/// A parser for the `LS_COLORS` environment variable.
use std::collections::HashMap;
/// Maps file extensions to ANSI colors / styles.
pub type ExtensionStyles = HashMap<String, Style>;

View File

@ -19,11 +19,11 @@ extern crate num_cpus;
extern crate regex;
extern crate regex_syntax;
pub mod fshelper;
pub mod lscolors;
mod app;
mod exec;
pub mod fshelper;
mod internal;
pub mod lscolors;
mod output;
mod walk;

View File

@ -6,16 +6,16 @@
// notice may not be copied, modified, or distributed except
// according to those terms.
use internal::{FdOptions, EXITCODE_ERROR, EXITCODE_SIGINT};
use fshelper::is_executable;
use internal::{FdOptions, EXITCODE_ERROR, EXITCODE_SIGINT};
use lscolors::LsColors;
use std::process;
use std::io::{self, Write};
use std::ops::Deref;
use std::path::{self, Component, Path, PathBuf};
use std::sync::Arc;
use std::process;
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc;
use ansi_term;

View File

@ -13,17 +13,17 @@ use fshelper;
use internal::{error, FdOptions, EXITCODE_SIGINT, MAX_BUFFER_LENGTH};
use output;
use std::process;
use std::error::Error;
use std::path::PathBuf;
use std::sync::{Arc, Mutex};
use std::process;
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::mpsc::channel;
use std::sync::{Arc, Mutex};
use std::thread;
use std::time;
use ignore::{self, WalkBuilder};
use ignore::overrides::OverrideBuilder;
use ignore::{self, WalkBuilder};
use regex::Regex;
/// The receiver thread can either be buffering results or directly streaming to the console.

View File

@ -12,10 +12,10 @@ extern crate regex;
mod testenv;
use testenv::TestEnv;
use regex::escape;
use std::fs;
use std::io::Write;
use testenv::TestEnv;
static DEFAULT_DIRS: &'static [&'static str] = &["one/two/three", "one/two/three/directory_foo"];