Siplify
This commit is contained in:
@@ -18,7 +18,6 @@ pub struct Config {
|
|||||||
pub client_caps: ClientCapsConfig,
|
pub client_caps: ClientCapsConfig,
|
||||||
|
|
||||||
pub with_sysroot: bool,
|
pub with_sysroot: bool,
|
||||||
// TODO: verify that it means what I think it means
|
|
||||||
pub publish_diagnostics: bool,
|
pub publish_diagnostics: bool,
|
||||||
// TODO: move to experimental capabilities
|
// TODO: move to experimental capabilities
|
||||||
pub vscode_lldb: bool,
|
pub vscode_lldb: bool,
|
||||||
|
|||||||
@@ -889,10 +889,9 @@ fn update_file_notifications_on_threadpool(
|
|||||||
subscriptions: Vec<FileId>,
|
subscriptions: Vec<FileId>,
|
||||||
) {
|
) {
|
||||||
log::trace!("updating notifications for {:?}", subscriptions);
|
log::trace!("updating notifications for {:?}", subscriptions);
|
||||||
let publish_diagnostics = world.config.publish_diagnostics;
|
if world.config.publish_diagnostics {
|
||||||
pool.execute(move || {
|
pool.execute(move || {
|
||||||
for file_id in subscriptions {
|
for file_id in subscriptions {
|
||||||
if publish_diagnostics {
|
|
||||||
match handlers::publish_diagnostics(&world, file_id) {
|
match handlers::publish_diagnostics(&world, file_id) {
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
if !is_canceled(&e) {
|
if !is_canceled(&e) {
|
||||||
@@ -904,8 +903,8 @@ fn update_file_notifications_on_threadpool(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn show_message(typ: req::MessageType, message: impl Into<String>, sender: &Sender<Message>) {
|
pub fn show_message(typ: req::MessageType, message: impl Into<String>, sender: &Sender<Message>) {
|
||||||
|
|||||||
Reference in New Issue
Block a user