Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--crates/rust-analyzer/src/flycheck.rs14
1 files changed, 6 insertions, 8 deletions
diff --git a/crates/rust-analyzer/src/flycheck.rs b/crates/rust-analyzer/src/flycheck.rs
index 36483699ac..ed74d9cf3b 100644
--- a/crates/rust-analyzer/src/flycheck.rs
+++ b/crates/rust-analyzer/src/flycheck.rs
@@ -398,14 +398,12 @@ impl FlycheckActor {
package_id: Some(package_id.clone()),
});
}
- } else {
- if !self.diagnostics_cleared_for_all {
- self.diagnostics_cleared_for_all = true;
- self.send(FlycheckMessage::ClearDiagnostics {
- id: self.id,
- package_id: None,
- });
- }
+ } else if !self.diagnostics_cleared_for_all {
+ self.diagnostics_cleared_for_all = true;
+ self.send(FlycheckMessage::ClearDiagnostics {
+ id: self.id,
+ package_id: None,
+ });
}
self.send(FlycheckMessage::AddDiagnostic {
id: self.id,