mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-05-19 09:40:22 -07:00
Simplify code.
Instead of `Ok(n) if n == 0` we can just write `Ok(0)`.
This commit is contained in:
parent
0473df1ef5
commit
160f04894f
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user