]> git.proxmox.com Git - rustc.git/blob - src/doc/book/listings/ch13-functional-features/listing-13-19/src/main.rs
New upstream version 1.63.0+dfsg1
[rustc.git] / src / doc / book / listings / ch13-functional-features / listing-13-19 / src / main.rs
1 use std::env;
2 use std::process;
3
4 use minigrep::Config;
5
6 fn main() {
7 let config = Config::build(env::args()).unwrap_or_else(|err| {
8 eprintln!("Problem parsing arguments: {err}");
9 process::exit(1);
10 });
11
12 if let Err(e) = minigrep::run(config) {
13 eprintln!("Application error: {e}");
14
15 process::exit(1);
16 }
17 }