diff options
author | Aleksey Kladov <[email protected]> | 2019-08-31 12:47:37 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-08-31 12:47:37 +0100 |
commit | 4e3f5cc7293d97aef4630ea30b8e9ad6931589a8 (patch) | |
tree | 00e5db62b89604bb005f45368d0caa2642a2d350 /crates/ra_lsp_server/src/project_model.rs | |
parent | f90a88630195a1b6b542b5883295d66dd6c59cef (diff) |
cleanup main loop
Diffstat (limited to 'crates/ra_lsp_server/src/project_model.rs')
-rw-r--r-- | crates/ra_lsp_server/src/project_model.rs | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/crates/ra_lsp_server/src/project_model.rs b/crates/ra_lsp_server/src/project_model.rs deleted file mode 100644 index 6234563f2..000000000 --- a/crates/ra_lsp_server/src/project_model.rs +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | use std::path::PathBuf; | ||
2 | |||
3 | use crate::{thread_worker::Worker, Result}; | ||
4 | |||
5 | pub use ra_project_model::{ | ||
6 | CargoWorkspace, Package, ProjectWorkspace, Sysroot, Target, TargetKind, | ||
7 | }; | ||
8 | |||
9 | pub fn workspace_loader(with_sysroot: bool) -> Worker<PathBuf, Result<ProjectWorkspace>> { | ||
10 | Worker::<PathBuf, Result<ProjectWorkspace>>::spawn( | ||
11 | "workspace loader", | ||
12 | 1, | ||
13 | move |input_receiver, output_sender| { | ||
14 | input_receiver | ||
15 | .into_iter() | ||
16 | .map(|path| ProjectWorkspace::discover_with_sysroot(path.as_path(), with_sysroot)) | ||
17 | .try_for_each(|it| output_sender.send(it)) | ||
18 | .unwrap() | ||
19 | }, | ||
20 | ) | ||
21 | } | ||