Skip to content

Commit

Permalink
Don't panic if file operations fail.
Browse files Browse the repository at this point in the history
  • Loading branch information
nnethercote committed Jun 12, 2019
1 parent 52ec80f commit 3afe1ba
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.rs
Expand Up @@ -82,7 +82,10 @@ fn main() -> io::Result<()> {
match do_main() {
Ok(_) => Ok(()),
Err(ref err) if err.kind() == io::ErrorKind::BrokenPipe => Ok(()),
Err(err) => Err(err),
Err(err) => {
eprintln!("counts: {}", err);
std::process::exit(1);
}
}
}

0 comments on commit 3afe1ba

Please sign in to comment.