diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-10-15 21:59:33 +0100 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-10-15 21:59:33 +0100 |
commit | 8c74fd96192679525f985b9f6f85e9bdc011aa09 (patch) | |
tree | c606c0c34cb6a1e8ea3ea92b5bac0edaafa4d81e /crates/ra_lsp_server/src | |
parent | 575b8635073ae0ea9e2aebbab613daf97fe9af90 (diff) | |
parent | f30a7deff17d7a69e1e9876d96d00392cd8f6fd1 (diff) |
Merge #101
101: migrate to salsa-rs/salsa r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_lsp_server/src')
-rw-r--r-- | crates/ra_lsp_server/src/main_loop/handlers.rs | 4 | ||||
-rw-r--r-- | crates/ra_lsp_server/src/main_loop/mod.rs | 4 | ||||
-rw-r--r-- | crates/ra_lsp_server/src/server_world.rs | 1 |
3 files changed, 4 insertions, 5 deletions
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs index 1fe78f3d0..5acb39b60 100644 --- a/crates/ra_lsp_server/src/main_loop/handlers.rs +++ b/crates/ra_lsp_server/src/main_loop/handlers.rs | |||
@@ -478,7 +478,7 @@ pub fn handle_code_action( | |||
478 | } | 478 | } |
479 | 479 | ||
480 | pub fn publish_diagnostics( | 480 | pub fn publish_diagnostics( |
481 | world: ServerWorld, | 481 | world: &ServerWorld, |
482 | file_id: FileId, | 482 | file_id: FileId, |
483 | ) -> Result<req::PublishDiagnosticsParams> { | 483 | ) -> Result<req::PublishDiagnosticsParams> { |
484 | let uri = world.file_id_to_uri(file_id)?; | 484 | let uri = world.file_id_to_uri(file_id)?; |
@@ -497,7 +497,7 @@ pub fn publish_diagnostics( | |||
497 | } | 497 | } |
498 | 498 | ||
499 | pub fn publish_decorations( | 499 | pub fn publish_decorations( |
500 | world: ServerWorld, | 500 | world: &ServerWorld, |
501 | file_id: FileId, | 501 | file_id: FileId, |
502 | ) -> Result<req::PublishDecorationsParams> { | 502 | ) -> Result<req::PublishDecorationsParams> { |
503 | let uri = world.file_id_to_uri(file_id)?; | 503 | let uri = world.file_id_to_uri(file_id)?; |
diff --git a/crates/ra_lsp_server/src/main_loop/mod.rs b/crates/ra_lsp_server/src/main_loop/mod.rs index 773501efe..cf2477cb5 100644 --- a/crates/ra_lsp_server/src/main_loop/mod.rs +++ b/crates/ra_lsp_server/src/main_loop/mod.rs | |||
@@ -391,7 +391,7 @@ fn update_file_notifications_on_threadpool( | |||
391 | ) { | 391 | ) { |
392 | pool.spawn(move || { | 392 | pool.spawn(move || { |
393 | for file_id in subscriptions { | 393 | for file_id in subscriptions { |
394 | match handlers::publish_diagnostics(world.clone(), file_id) { | 394 | match handlers::publish_diagnostics(&world, file_id) { |
395 | Err(e) => { | 395 | Err(e) => { |
396 | error!("failed to compute diagnostics: {:?}", e) | 396 | error!("failed to compute diagnostics: {:?}", e) |
397 | } | 397 | } |
@@ -400,7 +400,7 @@ fn update_file_notifications_on_threadpool( | |||
400 | sender.send(Task::Notify(not)); | 400 | sender.send(Task::Notify(not)); |
401 | } | 401 | } |
402 | } | 402 | } |
403 | match handlers::publish_decorations(world.clone(), file_id) { | 403 | match handlers::publish_decorations(&world, file_id) { |
404 | Err(e) => { | 404 | Err(e) => { |
405 | error!("failed to compute decorations: {:?}", e) | 405 | error!("failed to compute decorations: {:?}", e) |
406 | } | 406 | } |
diff --git a/crates/ra_lsp_server/src/server_world.rs b/crates/ra_lsp_server/src/server_world.rs index c931afa02..9b3013ae8 100644 --- a/crates/ra_lsp_server/src/server_world.rs +++ b/crates/ra_lsp_server/src/server_world.rs | |||
@@ -23,7 +23,6 @@ pub struct ServerWorldState { | |||
23 | pub mem_map: FxHashMap<FileId, Option<String>>, | 23 | pub mem_map: FxHashMap<FileId, Option<String>>, |
24 | } | 24 | } |
25 | 25 | ||
26 | #[derive(Clone)] | ||
27 | pub struct ServerWorld { | 26 | pub struct ServerWorld { |
28 | pub workspaces: Arc<Vec<CargoWorkspace>>, | 27 | pub workspaces: Arc<Vec<CargoWorkspace>>, |
29 | pub analysis: Analysis, | 28 | pub analysis: Analysis, |