Skip to content

Commit 48a2ff0

Browse files
author
greg
committed
clippy
1 parent 34fce23 commit 48a2ff0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

helix-term/src/commands.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4866,10 +4866,10 @@ fn increment_impl(cx: &mut Context, amount: i64) {
48664866
let mut last_change_to = 0;
48674867

48684868
// Overlapping changes will panic so we keep the earliest in the document of any
4869-
// that overlap. Selection ranges in the resulting doc will be only from changes that are
4870-
// kept.
4869+
// that overlap. Selection ranges in the resulting doc will be only from changes
4870+
// that are kept.
48714871
for change in maybe_changes.into_iter() {
4872-
if changes.len() == 0 || change.0 >= last_change_to {
4872+
if changes.is_empty() || change.0 >= last_change_to {
48734873
let length_diff =
48744874
(change.2.as_ref().unwrap().len() as i128) - ((change.1 - change.0) as i128);
48754875
// Selection after increment is the first character of the new number.
@@ -4885,7 +4885,7 @@ fn increment_impl(cx: &mut Context, amount: i64) {
48854885
}
48864886
}
48874887

4888-
if changes.len() > 0 {
4888+
if !changes.is_empty() {
48894889
let new_selection_primary =
48904890
std::cmp::min(selection.primary_index(), new_selection_ranges.len() - 1);
48914891
let new_selection = Selection::new(new_selection_ranges, new_selection_primary);

0 commit comments

Comments
 (0)