From c74cd48f38863b3004eaf2b52336ed0597337044 Mon Sep 17 00:00:00 2001 From: Jason Rodney Hansen Date: Sun, 28 Nov 2021 10:58:52 -0700 Subject: Cleanup --- helix-term/src/commands.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'helix-term') diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 4869a135..c89c81db 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -5803,17 +5803,17 @@ fn increment_impl(cx: &mut Context, amount: i64) { let text = doc.text(); let changes = selection.ranges().iter().filter_map(|range| { - let incrementor: Option> = if let Some(incrementor) = + let incrementor: Box = if let Some(incrementor) = DateTimeIncrementor::from_range(text.slice(..), *range) { - Some(Box::new(incrementor)) + Box::new(incrementor) } else if let Some(incrementor) = NumberIncrementor::from_range(text.slice(..), *range) { - Some(Box::new(incrementor)) + Box::new(incrementor) } else { - None + return None; }; - let (range, new_text) = incrementor?.increment(amount); + let (range, new_text) = incrementor.increment(amount); Some((range.from(), range.to(), Some(new_text))) }); -- cgit v1.2.3-70-g09d2