@@ -84,19 +84,18 @@ pub mod util {
8484 None => None,
8585 };
8686
87− let tags = if let Some(ref tags) = diag.tags {
88− let new_tags = tags
89− .iter()
90− .map(|tag| match tag {
91− helix_core::diagnostic::DiagnosticTag::Unnecessary => {
92− lsp::DiagnosticTag::UNNECESSARY
93− }
94− helix_core::diagnostic::DiagnosticTag::Deprecated => {
95− lsp::DiagnosticTag::DEPRECATED
96− }
97− })
98− .collect();
87+ let new_tags: Vec<_> = diag
88+ .tags
89+ .iter()
90+ .map(|tag| match tag {
91+ helix_core::diagnostic::DiagnosticTag::Unnecessary => {
92+ lsp::DiagnosticTag::UNNECESSARY
93+ }
94+ helix_core::diagnostic::DiagnosticTag::Deprecated => lsp::DiagnosticTag::DEPRECATED,
95+ })
96+ .collect();
9997
98+ let tags = if !new_tags.is_empty() {
10099 Some(new_tags)
101100 } else {
102101 None