Skip to content

Commit

Permalink
Use map_or instead of unwrap_or
Browse files Browse the repository at this point in the history
Co-authored-by: Poliorcetics <[email protected]>
  • Loading branch information
zummenix and poliorcetics committed Dec 10, 2022
1 parent 52abf2c commit 8bc44b8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions helix-term/src/commands/lsp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,13 @@ impl PickerDiagnostic {
let symbol = self
.diag
.severity
.map(|s| match s {
.map_or(' ', |s| match s {
DiagnosticSeverity::HINT => 'H',
DiagnosticSeverity::INFORMATION => 'I',
DiagnosticSeverity::WARNING => 'W',
DiagnosticSeverity::ERROR => 'E',
_ => ' ',
})
.unwrap_or(' ');
});
format!("{} ", symbol)
}
}
Expand Down

0 comments on commit 8bc44b8

Please sign in to comment.