Auto merge of #29535 - Toby-S:patch-1, r=steveklabnik
This basically just inlines the fatal! macro from BurntSushi's [blog post](http://blog.burntsushi.net/rust-error-handling/#argument-parsing). cc @steveklabnik
This commit is contained in:
commit
f18c905163
@ -2074,7 +2074,7 @@ tweak the case analysis in `main`:
|
||||
```rust,ignore
|
||||
match search(&args.arg_data_path, &args.arg_city) {
|
||||
Err(CliError::NotFound) if args.flag_quiet => process::exit(1),
|
||||
Err(err) => fatal!("{}", err),
|
||||
Err(err) => panic!("{}", err),
|
||||
Ok(pops) => for pop in pops {
|
||||
println!("{}, {}: {:?}", pop.city, pop.country, pop.count);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user