aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-12-02 01:31:19 +0000
committerBlaž Hrastnik2021-12-02 01:31:19 +0000
commitd14ca05d6b877826337db02888514269e1071f8c (patch)
treeb1e1f4d8086784a8f4c45ffc150926b5a806f03f /helix-view/src
parentde5e5863aa0b48a9853ea1e692cd13faea680bda (diff)
Simplify some cases that use return None to use ?
Diffstat (limited to 'helix-view/src')
-rw-r--r--helix-view/src/gutter.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/helix-view/src/gutter.rs b/helix-view/src/gutter.rs
index f1127b6e..e156b9e5 100644
--- a/helix-view/src/gutter.rs
+++ b/helix-view/src/gutter.rs
@@ -119,12 +119,7 @@ pub fn breakpoints<'doc>(
Box::new(move |line: usize, _selected: bool, out: &mut String| {
let breakpoint = breakpoints
.iter()
- .find(|breakpoint| breakpoint.line == line);
-
- let breakpoint = match breakpoint {
- Some(b) => b,
- None => return None,
- };
+ .find(|breakpoint| breakpoint.line == line)?;
let mut style = if breakpoint.condition.is_some() && breakpoint.log_message.is_some() {
error.add_modifier(Modifier::UNDERLINED)