aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-04-02 11:50:34 +0100
committerAleksey Kladov <[email protected]>2020-04-02 11:50:34 +0100
commite21bf1b2b91041be601d22c3415daf9bcb7246a8 (patch)
treed91eaabc7135a39e2b2d4f11fe520d374174af23 /crates
parent48c58309cca718701e902b05221a8e8ec81310db (diff)
Siplify
Diffstat (limited to 'crates')
-rw-r--r--crates/rust-analyzer/src/config.rs1
-rw-r--r--crates/rust-analyzer/src/main_loop.rs11
2 files changed, 5 insertions, 7 deletions
diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs
index 15aab7f09..07fb8f16a 100644
--- a/crates/rust-analyzer/src/config.rs
+++ b/crates/rust-analyzer/src/config.rs
@@ -18,7 +18,6 @@ pub struct Config {
18 pub client_caps: ClientCapsConfig, 18 pub client_caps: ClientCapsConfig,
19 19
20 pub with_sysroot: bool, 20 pub with_sysroot: bool,
21 // TODO: verify that it means what I think it means
22 pub publish_diagnostics: bool, 21 pub publish_diagnostics: bool,
23 // TODO: move to experimental capabilities 22 // TODO: move to experimental capabilities
24 pub vscode_lldb: bool, 23 pub vscode_lldb: bool,
diff --git a/crates/rust-analyzer/src/main_loop.rs b/crates/rust-analyzer/src/main_loop.rs
index 36ea85cc6..95e676e0f 100644
--- a/crates/rust-analyzer/src/main_loop.rs
+++ b/crates/rust-analyzer/src/main_loop.rs
@@ -889,10 +889,9 @@ fn update_file_notifications_on_threadpool(
889 subscriptions: Vec<FileId>, 889 subscriptions: Vec<FileId>,
890) { 890) {
891 log::trace!("updating notifications for {:?}", subscriptions); 891 log::trace!("updating notifications for {:?}", subscriptions);
892 let publish_diagnostics = world.config.publish_diagnostics; 892 if world.config.publish_diagnostics {
893 pool.execute(move || { 893 pool.execute(move || {
894 for file_id in subscriptions { 894 for file_id in subscriptions {
895 if publish_diagnostics {
896 match handlers::publish_diagnostics(&world, file_id) { 895 match handlers::publish_diagnostics(&world, file_id) {
897 Err(e) => { 896 Err(e) => {
898 if !is_canceled(&e) { 897 if !is_canceled(&e) {
@@ -904,8 +903,8 @@ fn update_file_notifications_on_threadpool(
904 } 903 }
905 } 904 }
906 } 905 }
907 } 906 })
908 }); 907 }
909} 908}
910 909
911pub fn show_message(typ: req::MessageType, message: impl Into<String>, sender: &Sender<Message>) { 910pub fn show_message(typ: req::MessageType, message: impl Into<String>, sender: &Sender<Message>) {