1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-08-01 13:37:48 +00:00

refactor/shred ~ fix cargo clippy complaint (clippy::needless_borrow)

This commit is contained in:
Roy Ivy III 2021-06-05 22:14:34 -05:00
parent 2f7c488425
commit 08713d22ec

View file

@ -381,7 +381,7 @@ pub fn uumain(args: impl uucore::Args) -> i32 {
for path_str in matches.values_of(options::FILE).unwrap() {
wipe_file(
&path_str, iterations, remove, size, exact, zero, verbose, force,
path_str, iterations, remove, size, exact, zero, verbose, force,
);
}
@ -659,7 +659,7 @@ fn do_remove(path: &Path, orig_filename: &str, verbose: bool) -> Result<(), io::
println!("{}: {}: removing", NAME, orig_filename);
}
let renamed_path: Option<PathBuf> = wipe_name(&path, verbose);
let renamed_path: Option<PathBuf> = wipe_name(path, verbose);
if let Some(rp) = renamed_path {
fs::remove_file(rp)?;
}