Skip to content

Commit e21bf1b

Browse files
committed
Siplify
1 parent 48c5830 commit e21bf1b

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

crates/rust-analyzer/src/config.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ pub struct Config {
1818
pub client_caps: ClientCapsConfig,
1919

2020
pub with_sysroot: bool,
21-
// TODO: verify that it means what I think it means
2221
pub publish_diagnostics: bool,
2322
// TODO: move to experimental capabilities
2423
pub vscode_lldb: bool,

crates/rust-analyzer/src/main_loop.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -889,10 +889,9 @@ fn update_file_notifications_on_threadpool(
889889
subscriptions: Vec<FileId>,
890890
) {
891891
log::trace!("updating notifications for {:?}", subscriptions);
892-
let publish_diagnostics = world.config.publish_diagnostics;
893-
pool.execute(move || {
894-
for file_id in subscriptions {
895-
if publish_diagnostics {
892+
if world.config.publish_diagnostics {
893+
pool.execute(move || {
894+
for file_id in subscriptions {
896895
match handlers::publish_diagnostics(&world, file_id) {
897896
Err(e) => {
898897
if !is_canceled(&e) {
@@ -904,8 +903,8 @@ fn update_file_notifications_on_threadpool(
904903
}
905904
}
906905
}
907-
}
908-
});
906+
})
907+
}
909908
}
910909

911910
pub fn show_message(typ: req::MessageType, message: impl Into<String>, sender: &Sender<Message>) {

0 commit comments

Comments
 (0)