From 3cee41f4686cf7cfe4e12c29fd222be89f811f14 Mon Sep 17 00:00:00 2001 From: Adam Carpenter <53hornet@gmail.com> Date: Thu, 28 Feb 2019 09:21:32 -0500 Subject: Added STDERR printing to minigrep. --- minigrep/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'minigrep/src') diff --git a/minigrep/src/main.rs b/minigrep/src/main.rs index b1581c9..3cec101 100644 --- a/minigrep/src/main.rs +++ b/minigrep/src/main.rs @@ -7,11 +7,11 @@ use minigrep::Config; fn main() { let args: Vec = 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); } } -- cgit v1.2.3