diff --git a/Cargo.lock b/Cargo.lock index a6c23c9bc..de9fe11cf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3238,7 +3238,6 @@ dependencies = [ "data-encoding-macro", "dns-lookup", "dunce", - "getopts", "lazy_static", "libc", "nix 0.23.1", diff --git a/src/uu/du/src/du.rs b/src/uu/du/src/du.rs index 6db088ea1..58d01701f 100644 --- a/src/uu/du/src/du.rs +++ b/src/uu/du/src/du.rs @@ -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)); } }; diff --git a/src/uucore/Cargo.toml b/src/uucore/Cargo.toml index a97f82133..99e1061ec 100644 --- a/src/uucore/Cargo.toml +++ b/src/uucore/Cargo.toml @@ -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 }