Skip to content

Commit

Permalink
print error to stderr
Browse files Browse the repository at this point in the history
  • Loading branch information
FORGIS98 committed Sep 9, 2021
1 parent 6f96bc1 commit 8e848ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions minigrep/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ fn main() {
let args: Vec<String> = env::args().collect();

let config = Config::new(&args).unwrap_or_else(|err| {
println!("Problem parsing arguments: {}", err);
eprintln!("Problem parsing arguments: {}", err);
process::exit(1);
});

if let Err(e) = minigrep::run(config) {
println!("Application error: {}", e);
eprintln!("Application error: {}", e);
process::exit(1);
}
}

0 comments on commit 8e848ab

Please sign in to comment.