Skip to main content

coalesce

Function coalesce 

Source
pub fn coalesce(
    items: impl IntoIterator<Item = DiagnosticItem>,
) -> Vec<DiagnosticItem>
Expand description

Keep only the latest diagnostics per document, in the order documents first appear.

DiagnosticPublisher sends a document’s full, merged set on every publish, once per reason (syntax, prefixes, shapes, …). A front-end drains what is queued and sends each document once, instead of once per reason.