fix lint, fmt & udeps errors

This commit is contained in:
Terts Diepraam 2022-01-01 19:43:44 +01:00
parent 62341112df
commit 7fa720d311
3 changed files with 3 additions and 6 deletions

1
Cargo.lock generated
View file

@ -3238,7 +3238,6 @@ dependencies = [
"data-encoding-macro",
"dns-lookup",
"dunce",
"getopts",
"lazy_static",
"libc",
"nix 0.23.1",

View file

@ -18,7 +18,7 @@ use std::env;
use std::fs;
#[cfg(not(windows))]
use std::fs::Metadata;
use std::io::{stderr, ErrorKind, Result, Write};
use std::io::{ErrorKind, Result};
use std::iter;
#[cfg(not(windows))]
use std::os::unix::fs::MetadataExt;
@ -292,13 +292,12 @@ fn du(
let read = match fs::read_dir(&my_stat.path) {
Ok(read) => read,
Err(e) => {
writeln!(
stderr(),
eprintln!(
"{}: cannot read directory {}: {}",
options.util_name,
my_stat.path.quote(),
e
).unwrap();
);
return Box::new(iter::once(my_stat));
}
};

View file

@ -19,7 +19,6 @@ path="src/lib/lib.rs"
clap = "2.33.3"
dns-lookup = { version="1.0.5", optional=true }
dunce = "1.0.0"
getopts = "<= 0.2.21"
wild = "2.0"
# * optional
thiserror = { version="1.0", optional=true }