Simplify code a bit (suggestions by clippy)

This commit is contained in:
xanonid 2020-10-16 16:17:05 +02:00 committed by David Peter
parent 2cd3de8b94
commit 441a235a0f
2 changed files with 2 additions and 3 deletions

View File

@ -405,11 +405,11 @@ fn run() -> Result<ExitCode> {
exclude_patterns: matches
.values_of("exclude")
.map(|v| v.map(|p| String::from("!") + p).collect())
.unwrap_or_else(|| vec![]),
.unwrap_or_else(Vec::new),
ignore_files: matches
.values_of("ignore-file")
.map(|vs| vs.map(PathBuf::from).collect())
.unwrap_or_else(|| vec![]),
.unwrap_or_else(Vec::new),
size_constraints: size_limits,
time_constraints,
#[cfg(unix)]

View File

@ -4,7 +4,6 @@ use std::process;
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc;
use ansi_term;
use lscolors::{LsColors, Style};
use crate::exit_codes::ExitCode;