v0.1.4: use stderr for error messages

This commit is contained in:
AJ ONeal 2018-09-18 22:23:18 -06:00
父節點 4d72618bb9
當前提交 70adbe6c9b
共有 1 個檔案被更改,包括 2 行新增2 行删除

查看文件

@ -7,13 +7,13 @@ fn main() {
let args: Vec<String> = env::args().collect();
let conf = grep::Config::new(&args).unwrap_or_else(|err| {
println!("Problem parsing arguments: {}", err);
eprintln!("Problem parsing arguments: {}", err);
process::exit(1);
});
//let filename = &conf.filename.clone();
if let Err(e) = grep::run(conf) {
println!("Big bad bada boom!\n{:?}", e);
eprintln!("Big bad bada boom!\n{:?}", e);
//println!("Big bad bada boom!\n{:?}", e.kind());
//println!("Big bad bada boom!\n{}", e.description());