diff --git a/src/fop.rs b/src/fop.rs index 65ee738..b829602 100644 --- a/src/fop.rs +++ b/src/fop.rs @@ -27,7 +27,7 @@ extern crate strerror; extern crate sysexits; use getopt::{ Opt, Parser }; -use strerror::raw_message; +use strerror::StrError; use sysexits::{ EX_DATAERR, EX_IOERR, EX_UNAVAILABLE, EX_USAGE }; fn main() { @@ -77,7 +77,7 @@ fn main() { .stdout(Stdio::piped()) .spawn() .unwrap_or_else( |e| { - eprintln!("{}: {}: {}", argv[0], argv[command_arg], raw_message(e)); + eprintln!("{}: {}: {}", argv[0], argv[command_arg], e.strerror()); exit(EX_UNAVAILABLE); }); @@ -96,7 +96,7 @@ fn main() { } let output = spawned.wait_with_output().unwrap_or_else(|e| { - eprintln!("{}: {}: {}", argv[0], argv[command_arg], raw_message(e)); + eprintln!("{}: {}: {}", argv[0], argv[command_arg], e.strerror()); exit(EX_IOERR); }); @@ -114,7 +114,7 @@ fn main() { stdout().write_all( fields.join(&d.to_string()).as_bytes() ).unwrap_or_else(|e| { - eprintln!("{}: {}", argv[0], raw_message(e)); + eprintln!("{}: {}", argv[0], e.strerror()); exit(EX_IOERR); }); } diff --git a/src/hru.rs b/src/hru.rs index 29e1e49..b7937f7 100644 --- a/src/hru.rs +++ b/src/hru.rs @@ -26,7 +26,7 @@ use std::{ extern crate strerror; extern crate sysexits; -use strerror::raw_message; +use strerror::StrError; use sysexits::{ EX_DATAERR, EX_IOERR, EX_SOFTWARE }; const LIST: [(u32, &str); 10] = [ @@ -100,7 +100,7 @@ fn main() -> ExitCode { stdout().write_all(format!("{} {}\n", out, si_prefix).as_bytes()) .unwrap_or_else(|e| { - eprintln!("{}: {}", argv[0], raw_message(e)); + eprintln!("{}: {}", argv[0], e.strerror()); exit(EX_IOERR); }); }