-
-
Save rust-play/5689af5322e9e26eb95458a159289f43 to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::env; | |
use std::process; | |
use minigrep::Config; | |
fn main() { | |
let config = Config::build(env::args()).unwrap_or_else(|err| { | |
eprintln!("Problem parsing arguments: {err}"); | |
process::exit(1); | |
}); | |
if let Err(e) = minigrep::run(config) { | |
eprintln!("Application error: {e}"); | |
process::exit(1); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment