From eb953c3b8444f1e24bed55071247a9ea14200805 Mon Sep 17 00:00:00 2001 From: Daniel Poulin Date: Sat, 28 Jan 2023 15:02:36 -0500 Subject: [PATCH] Cargo fmt --- helix-term/src/commands.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index edc95b2dfa79c..26962ffb04d02 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -2069,7 +2069,7 @@ fn extend_line_impl(cx: &mut Context, extend: Extend) { let start = text.line_to_char(start_line); let end = text.line_to_char( (end_line + 1) // newline of end_line - .min(text.len_lines()), + .min(text.len_lines()), ); // extend to previous/next line if current line is selected @@ -5099,10 +5099,10 @@ fn increment_impl(cx: &mut Context, increment_direction: IncrementDirection) { let selected_text: Cow = range.fragment(text); let new_from = ((range.from() as i128) + cumulative_length_diff) as usize; let incremented = [increment::integer, increment::date_time] - .iter() + .iter() .find_map(|incrementor| incrementor(selected_text.as_ref(), amount)); - amount += increase_by; + amount += increase_by; match incremented { None => { @@ -5111,14 +5111,14 @@ fn increment_impl(cx: &mut Context, increment_direction: IncrementDirection) { (range.to() as i128 + cumulative_length_diff) as usize, ); new_selection_ranges.push(new_range); - } + } Some(new_text) => { let new_range = Range::new(new_from, new_from + new_text.len()); cumulative_length_diff += new_text.len() as i128 - selected_text.len() as i128; new_selection_ranges.push(new_range); changes.push((range.from(), range.to(), Some(new_text.into()))); - } } + } } if !changes.is_empty() {