mirror of https://github.com/sharkdp/fd.git
Quit immediately if the channel::send call failed
This commit is contained in:
parent
762f551ff4
commit
0f27485faf
10
src/walk.rs
10
src/walk.rs
|
@ -373,10 +373,12 @@ fn spawn_senders(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: take care of the unwrap call
|
let send_result = tx_thread
|
||||||
tx_thread
|
.send(WorkerResult::Entry(entry_path.to_owned()));
|
||||||
.send(WorkerResult::Entry(entry_path.to_owned()))
|
|
||||||
.unwrap();
|
if !send_result.is_ok() {
|
||||||
|
return ignore::WalkState::Quit;
|
||||||
|
}
|
||||||
|
|
||||||
ignore::WalkState::Continue
|
ignore::WalkState::Continue
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue