mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-06-04 05:57:39 +02: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() {
|
fn main() {
|
||||||
match Args::parse().map(Arc::new).and_then(run) {
|
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),
|
Ok(_) => process::exit(0),
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
eprintln!("{}", err);
|
eprintln!("{}", err);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user