save one indent level in error handling for add_ignore
@@ -84,10 +84,9 @@ pub fn scan(path_vec: &[PathBuf], pattern: Arc<Regex>, config: Arc<FdOptions>) {
for ignore_file in &config.ignore_files {
let result = walker.add_ignore(ignore_file);
- if let Some(err) = result {
- match err {
- ignore::Error::Partial(_) => (),
- _ => {
+ match result {
+ Some(ignore::Error::Partial(_)) => (),
+ Some(err) => {
print_error!(
"{}",
format!(
@@ -97,7 +96,7 @@ pub fn scan(path_vec: &[PathBuf], pattern: Arc<Regex>, config: Arc<FdOptions>) {
)
);
}
- }
+ None => (),
}
}
