diff options
author | Blaž Hrastnik | 2021-12-06 03:50:28 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-12-06 03:50:28 +0000 |
commit | 35ac8154095b7eb853e0bc9bfca0879ec5b60be9 (patch) | |
tree | 0d3e26c01efe2ce45aea2255dda3d6bf6f9e1b85 /helix-view/src | |
parent | a2b22ec15207926acf9bbf6617492925a6e50d27 (diff) |
Fix compilation
nix-direnv issues still mess with my shell..
Diffstat (limited to 'helix-view/src')
-rw-r--r-- | helix-view/src/gutter.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/helix-view/src/gutter.rs b/helix-view/src/gutter.rs index 4c0edd90..af016c56 100644 --- a/helix-view/src/gutter.rs +++ b/helix-view/src/gutter.rs @@ -22,7 +22,8 @@ pub fn diagnostic<'doc>( Box::new(move |line: usize, _selected: bool, out: &mut String| { use helix_core::diagnostic::Severity; - if let Some(diagnostic) = diagnostics.binary_search_by_key(&line, |d| d.line) { + if let Ok(index) = diagnostics.binary_search_by_key(&line, |d| d.line) { + let diagnostic = &diagnostics[index]; write!(out, "●").unwrap(); return Some(match diagnostic.severity { Some(Severity::Error) => error, |