on master help sign in
Fix compilation

nix-direnv issues still mess with my shell..

commit35ac8154095b7eb853e0bc9bfca0879ec5b60be9 authorBlaž Hrastnik <blaz@mxxn.io> dateMon 6 Dec 2021, 12:50 (5 years ago) parenta2b22ec
1 file changed+2−1
helix-view/src/gutter.rs+2−1
helix-view/src/gutter.rs+2−1
@@ -22,7 +22,8 @@ pub fn diagnostic<'doc>(
2222
2323 Box::new(move |line: usize, _selected: bool, out: &mut String| {
2424 use helix_core::diagnostic::Severity;
25− if let Some(diagnostic) = diagnostics.binary_search_by_key(&line, |d| d.line) {
25+ if let Ok(index) = diagnostics.binary_search_by_key(&line, |d| d.line) {
26+ let diagnostic = &diagnostics[index];
2627 write!(out, "●").unwrap();
2728 return Some(match diagnostic.severity {
2829 Some(Severity::Error) => error,