mirror of
https://github.com/sharkdp/fd.git
synced 2024-11-17 17:35:16 +01:00
Quit immediately if the channel::send call failed
This commit is contained in:
parent
762f551ff4
commit
0f27485faf
1 changed files with 6 additions and 4 deletions
10
src/walk.rs
10
src/walk.rs
|
@ -373,10 +373,12 @@ fn spawn_senders(
|
|||
}
|
||||
}
|
||||
|
||||
// TODO: take care of the unwrap call
|
||||
tx_thread
|
||||
.send(WorkerResult::Entry(entry_path.to_owned()))
|
||||
.unwrap();
|
||||
let send_result = tx_thread
|
||||
.send(WorkerResult::Entry(entry_path.to_owned()));
|
||||
|
||||
if !send_result.is_ok() {
|
||||
return ignore::WalkState::Quit;
|
||||
}
|
||||
|
||||
ignore::WalkState::Continue
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue