MCPcopy Create free account
hub / github.com/hashintel/hash / generalize

Method generalize

libs/@local/hashql/diagnostics/src/issues.rs:615–624  ·  view source on GitHub ↗

Converts this collection to one that accepts any severity type. This is useful when you need to combine diagnostics with different severity type parameters into a single collection. # Examples ``` use hashql_diagnostics::{Diagnostic, DiagnosticIssues, Label, Severity}; # use hashql_diagnostics::category::TerminalDiagnosticCategory; # const CATEGORY: TerminalDiagnosticCategory = TerminalDiagnost

(self)

Source from the content-addressed store, hash-verified

613 /// assert_eq!(general_issues.critical(), 1);
614 /// ```
615 pub fn generalize(self) -> DiagnosticIssues<C, S, Severity> {
616 DiagnosticIssues {
617 diagnostics: self
618 .diagnostics
619 .into_iter()
620 .map(Diagnostic::generalize)
621 .collect(),
622 critical: self.critical,
623 }
624 }
625
626 #[must_use]
627 pub fn into_vec(self) -> Vec<Diagnostic<C, S, K>> {

Callers 10

process_statusFunction · 0.45
process_statusFunction · 0.45
sinkMethod · 0.45
into_issuesMethod · 0.45
with_diagnosticsMethod · 0.45
push_diagnosticMethod · 0.45
zipMethod · 0.45
from_astMethod · 0.45
lowerFunction · 0.45
operandMethod · 0.45

Calls 3

collectMethod · 0.80
mapMethod · 0.45
into_iterMethod · 0.45

Tested by

no test coverage detected