mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-25 11:17:13 +00:00
Merge pull request #20434 from ShoyuVanilla/diag-fix-again
fix: Panic while trying to clear old diagnostics while there's nothing
This commit is contained in:
commit
9db05508ed
@ -105,7 +105,7 @@ impl DiagnosticCollection {
|
|||||||
flycheck_id: usize,
|
flycheck_id: usize,
|
||||||
generation: DiagnosticsGeneration,
|
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);
|
self.clear_check(flycheck_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user