Skip to content

Commit f18c905

Browse files
committed
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
2 parents 5b87225 + d9df16b commit f18c905

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/doc/trpl/error-handling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2074,7 +2074,7 @@ tweak the case analysis in `main`:
20742074
```rust,ignore
20752075
match search(&args.arg_data_path, &args.arg_city) {
20762076
Err(CliError::NotFound) if args.flag_quiet => process::exit(1),
2077-
Err(err) => fatal!("{}", err),
2077+
Err(err) => panic!("{}", err),
20782078
Ok(pops) => for pop in pops {
20792079
println!("{}, {}: {:?}", pop.city, pop.country, pop.count);
20802080
}

0 commit comments

Comments
 (0)