Fix return out of match pattern

This commit is contained in:
himself65 2021-08-09 15:57:53 +08:00 committed by David Peter
parent c37592b0b7
commit 4e04d13215

View file

@ -358,27 +358,21 @@ fn spawn_senders(
DirEntry::BrokenSymlink(path) DirEntry::BrokenSymlink(path)
} }
_ => { _ => {
match tx_thread.send(WorkerResult::Error(ignore::Error::WithPath { return match tx_thread.send(WorkerResult::Error(ignore::Error::WithPath {
path, path,
err: inner_err, err: inner_err,
})) { })) {
Ok(_) => { Ok(_) => ignore::WalkState::Continue,
return ignore::WalkState::Continue; Err(_) => ignore::WalkState::Quit,
}
Err(_) => {
return ignore::WalkState::Quit;
}
} }
} }
}, },
Err(err) => match tx_thread.send(WorkerResult::Error(err)) { Err(err) => {
Ok(_) => { return match tx_thread.send(WorkerResult::Error(err)) {
return ignore::WalkState::Continue; Ok(_) => ignore::WalkState::Continue,
Err(_) => ignore::WalkState::Quit,
} }
Err(_) => {
return ignore::WalkState::Quit;
} }
},
}; };
if let Some(min_depth) = config.min_depth { if let Some(min_depth) = config.min_depth {