From c2c10b9014549e9c0783fb13dc202dfab6e6fd0a Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 30 Dec 2018 23:23:31 +0300 Subject: :arrow_up: crossbeam closes #189 --- crates/ra_vfs/src/io.rs | 4 +++- crates/ra_vfs/src/lib.rs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'crates/ra_vfs/src') diff --git a/crates/ra_vfs/src/io.rs b/crates/ra_vfs/src/io.rs index 4cfdb83da..80328ad18 100644 --- a/crates/ra_vfs/src/io.rs +++ b/crates/ra_vfs/src/io.rs @@ -32,8 +32,10 @@ pub(crate) type Worker = thread_worker::Worker; pub(crate) fn start() -> (Worker, WorkerHandle) { thread_worker::spawn("vfs", 128, |input_receiver, output_sender| { input_receiver + .into_iter() .map(handle_task) - .for_each(|it| output_sender.send(it)) + .try_for_each(|it| output_sender.send(it)) + .unwrap() }) } diff --git a/crates/ra_vfs/src/lib.rs b/crates/ra_vfs/src/lib.rs index 90d5e21f4..757eac95b 100644 --- a/crates/ra_vfs/src/lib.rs +++ b/crates/ra_vfs/src/lib.rs @@ -148,7 +148,7 @@ impl Vfs { path: path.clone(), filter: Box::new(filter), }; - res.worker.inp.send(task); + res.worker.inp.send(task).unwrap(); } let roots = res.roots.iter().map(|(id, _)| id).collect(); (res, roots) -- cgit v1.2.3