mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-01 20:31:59 +00:00
fix: Panic while trying to clear old diagnostics while there's nothing
This commit is contained in:
parent
3d2c40d705
commit
8af9607d28
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue