~irimi1/learning-rust

11d7b2b377083d35c84b39f35ab17f7c9b9bfe8e — Manuel GroƟ 1 year, 3 months ago 17e01c2
minigrep: Print errors to stderr
1 files changed, 2 insertions(+), 2 deletions(-)

M projects/minigrep/src/main.rs
M projects/minigrep/src/main.rs => projects/minigrep/src/main.rs +2 -2
@@ 7,12 7,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);
    }
}