getopts: format failure messages with Show.
This obsoletes the old `to_err_msg` method. Replace
println!("Error: {}", failure.to_err_msg())
let string = failure.to_err_msg();
with
println!("Error: {}", failure)
let string = failure.to_str();
[breaking-change]
This commit is contained in:
@@ -148,7 +148,7 @@ pub fn main_args(args: &[String]) -> int {
|
||||
let matches = match getopts::getopts(args.tail(), opts().as_slice()) {
|
||||
Ok(m) => m,
|
||||
Err(err) => {
|
||||
println!("{}", err.to_err_msg());
|
||||
println!("{}", err);
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user