Remove process::exit instance

This commit is contained in:
sharkdp 2020-04-03 21:34:59 +02:00 committed by David Peter
parent 53557ef471
commit 4815ee416e
2 changed files with 4 additions and 4 deletions

View file

@ -312,7 +312,7 @@ fn main() {
}
Err(err) => {
eprintln!("[fd error]: {}", err);
process::exit(1);
process::exit(ExitCode::GeneralError.into());
}
}
}

View file

@ -126,10 +126,10 @@ pub fn scan(path_vec: &[PathBuf], pattern: Arc<Regex>, config: Arc<Options>) ->
let exit_code = receiver_thread.join().unwrap();
if wants_to_quit.load(Ordering::Relaxed) {
process::exit(ExitCode::KilledBySigint.into());
Ok(ExitCode::KilledBySigint)
} else {
Ok(exit_code)
}
Ok(exit_code)
}
fn spawn_receiver(