dev: reduce a bundle of ts usage in query crate (#72)

This commit is contained in:
Myriad-Dreamin 2024-03-18 23:00:27 +08:00 committed by GitHub
parent c6509325a8
commit cc1f418423
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 204 additions and 117 deletions

View file

@ -101,7 +101,7 @@ fn diagnostic_related_information(
Ok(tracepoints)
}
fn diagnostic_span_id(typst_diagnostic: &TypstDiagnostic) -> Option<(FileId, TypstSpan)> {
fn diagnostic_span_id(typst_diagnostic: &TypstDiagnostic) -> Option<(TypstFileId, TypstSpan)> {
iter::once(typst_diagnostic.span)
.chain(typst_diagnostic.trace.iter().map(|trace| trace.span))
.find_map(|span| Some((span.id()?, span)))