diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-12-30 20:24:48 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-12-30 20:24:48 +0000 |
commit | 45e3de8eed878afa1066b61fa27f7625bf57b1e6 (patch) | |
tree | b53c11bcb1e117701fef86853eaf9a1675ae105f /crates/ra_vfs | |
parent | bb604f0a255078a6b30555a5535ee1d277237e38 (diff) | |
parent | c2c10b9014549e9c0783fb13dc202dfab6e6fd0a (diff) |
Merge #377
377: update crossbeam r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_vfs')
-rw-r--r-- | crates/ra_vfs/Cargo.toml | 2 | ||||
-rw-r--r-- | crates/ra_vfs/src/io.rs | 4 | ||||
-rw-r--r-- | crates/ra_vfs/src/lib.rs | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/crates/ra_vfs/Cargo.toml b/crates/ra_vfs/Cargo.toml index ccea8a866..7c170cdfc 100644 --- a/crates/ra_vfs/Cargo.toml +++ b/crates/ra_vfs/Cargo.toml | |||
@@ -8,7 +8,7 @@ authors = ["Aleksey Kladov <[email protected]>"] | |||
8 | walkdir = "2.2.7" | 8 | walkdir = "2.2.7" |
9 | relative-path = "0.4.0" | 9 | relative-path = "0.4.0" |
10 | rustc-hash = "1.0" | 10 | rustc-hash = "1.0" |
11 | crossbeam-channel = "0.2.4" | 11 | crossbeam-channel = "0.3.5" |
12 | log = "0.4.6" | 12 | log = "0.4.6" |
13 | 13 | ||
14 | thread_worker = { path = "../thread_worker" } | 14 | thread_worker = { path = "../thread_worker" } |
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<Task, TaskResult>; | |||
32 | pub(crate) fn start() -> (Worker, WorkerHandle) { | 32 | pub(crate) fn start() -> (Worker, WorkerHandle) { |
33 | thread_worker::spawn("vfs", 128, |input_receiver, output_sender| { | 33 | thread_worker::spawn("vfs", 128, |input_receiver, output_sender| { |
34 | input_receiver | 34 | input_receiver |
35 | .into_iter() | ||
35 | .map(handle_task) | 36 | .map(handle_task) |
36 | .for_each(|it| output_sender.send(it)) | 37 | .try_for_each(|it| output_sender.send(it)) |
38 | .unwrap() | ||
37 | }) | 39 | }) |
38 | } | 40 | } |
39 | 41 | ||
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 { | |||
148 | path: path.clone(), | 148 | path: path.clone(), |
149 | filter: Box::new(filter), | 149 | filter: Box::new(filter), |
150 | }; | 150 | }; |
151 | res.worker.inp.send(task); | 151 | res.worker.inp.send(task).unwrap(); |
152 | } | 152 | } |
153 | let roots = res.roots.iter().map(|(id, _)| id).collect(); | 153 | let roots = res.roots.iter().map(|(id, _)| id).collect(); |
154 | (res, roots) | 154 | (res, roots) |