shred: Replaced eprintln with show_error (#1992)

This commit is contained in:
Aleksandar Janicijevic 2021-04-01 02:53:48 -04:00 committed by GitHub
parent 7669a4387a
commit cf4970f083
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

6
Cargo.lock generated
View file

@ -2323,9 +2323,9 @@ dependencies = [
name = "uu_tac"
version = "0.0.4"
dependencies = [
"clap 2.33.3 (registry+https://github.com/rust-lang/crates.io-index)",
"uucore 0.0.7",
"uucore_procs 0.0.5",
"clap",
"uucore",
"uucore_procs",
]
[[package]]

View file

@ -329,8 +329,8 @@ this is the default for non-regular files",
let mut errs: Vec<String> = vec![];
if !matches.is_present(options::FILE) {
eprintln!("{}: Missing an argument", NAME);
eprintln!("For help, try '{} --help'", NAME);
show_error!("Missing an argument");
show_error!("For help, try '{} --help'", NAME);
return 0;
}
@ -367,9 +367,9 @@ this is the default for non-regular files",
let verbose = matches.is_present(options::VERBOSE);
if !errs.is_empty() {
eprintln!("Invalid arguments supplied.");
show_error!("Invalid arguments supplied.");
for message in errs {
eprintln!("{}", message);
show_error!("{}", message);
}
return 1;
}