mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-25 11:17:13 +00:00
fix: Panic while trying to clear old diagnostics while there's nothing
This commit is contained in:
parent
3d2c40d705
commit
8af9607d28
@ -105,7 +105,7 @@ impl DiagnosticCollection {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user