Skip to content

Commit

Permalink
Auto merge of #29535 - Toby-S:patch-1, r=steveklabnik
Browse files Browse the repository at this point in the history
This basically just inlines the fatal! macro from BurntSushi's [blog post](http://blog.burntsushi.net/rust-error-handling/#argument-parsing).

cc @steveklabnik
  • Loading branch information
bors committed Nov 3, 2015
2 parents 5b87225 + d9df16b commit f18c905
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/doc/trpl/error-handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit f18c905

Please sign in to comment.