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:
bors 2015-11-03 11:51:34 +00:00
commit f18c905163

View File

@ -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);
}