fix: Panic while trying to clear old diagnostics while there's nothing
diff --git a/crates/rust-analyzer/src/diagnostics.rs b/crates/rust-analyzer/src/diagnostics.rs
index 2711bdb..30f5301 100644
--- a/crates/rust-analyzer/src/diagnostics.rs
+++ b/crates/rust-analyzer/src/diagnostics.rs
@@ -105,7 +105,7 @@
flycheck_id: usize,
generation: DiagnosticsGeneration,
) {
- if self.check[flycheck_id].generation < generation {
+ if self.check.get(flycheck_id).is_some_and(|it| it.generation < generation) {
self.clear_check(flycheck_id);
}
}