Simplify code.

Instead of `Ok(n) if n == 0` we can just write `Ok(0)`.
This commit is contained in:
Andrew Gallant 2016-12-04 12:00:13 -05:00
parent 0473df1ef5
commit 160f04894f

View File

@ -64,7 +64,7 @@ pub type Result<T> = result::Result<T, Box<Error + Send + Sync>>;
fn main() {
match Args::parse().map(Arc::new).and_then(run) {
Ok(count) if count == 0 => process::exit(1),
Ok(0) => process::exit(1),
Ok(_) => process::exit(0),
Err(err) => {
eprintln!("{}", err);