Fix a bunch of other low-hanging style lints (#36498)

- **Fix a bunch of low hanging style lints like unnecessary-return**
- **Fix single worktree violation**
- **And the rest**

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2025-08-19 21:26:17 +02:00 committed by GitHub
parent df9c2aefb1
commit 05fc0c432c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
239 changed files with 854 additions and 1015 deletions

View file

@ -566,7 +566,6 @@ pub fn register(editor: &mut Editor, cx: &mut Context<Vim>) {
workspace.update(cx, |workspace, cx| {
e.notify_err(workspace, cx);
});
return;
}
});
@ -1444,7 +1443,7 @@ pub fn command_interceptor(mut input: &str, cx: &App) -> Vec<CommandInterceptRes
}];
}
}
return Vec::default();
Vec::default()
}
fn generate_positions(string: &str, query: &str) -> Vec<usize> {

View file

@ -103,7 +103,6 @@ impl Vim {
window.dispatch_keystroke(keystroke, cx);
});
}
return;
}
pub fn handle_literal_input(

View file

@ -47,7 +47,6 @@ impl Vim {
}
self.stop_recording_immediately(action.boxed_clone(), cx);
self.switch_mode(Mode::HelixNormal, false, window, cx);
return;
}
pub fn helix_normal_motion(

View file

@ -2375,7 +2375,7 @@ fn matching_tag(map: &DisplaySnapshot, head: DisplayPoint) -> Option<DisplayPoin
}
}
return None;
None
}
fn matching(map: &DisplaySnapshot, display_point: DisplayPoint) -> DisplayPoint {
@ -2517,7 +2517,7 @@ fn unmatched_forward(
}
display_point = new_point;
}
return display_point;
display_point
}
fn unmatched_backward(

View file

@ -120,7 +120,6 @@ impl Vim {
});
})
});
return;
}
fn open_path_mark(

View file

@ -224,7 +224,7 @@ impl Vim {
.search
.prior_selections
.last()
.map_or(true, |range| range.start != new_head);
.is_none_or(|range| range.start != new_head);
if is_different_head {
count = count.saturating_sub(1)

View file

@ -606,11 +606,11 @@ impl MarksState {
match target? {
MarkLocation::Buffer(entity_id) => {
let anchors = self.multibuffer_marks.get(entity_id)?;
return Some(Mark::Buffer(*entity_id, anchors.get(name)?.clone()));
Some(Mark::Buffer(*entity_id, anchors.get(name)?.clone()))
}
MarkLocation::Path(path) => {
let points = self.serialized_marks.get(path)?;
return Some(Mark::Path(path.clone(), points.get(name)?.clone()));
Some(Mark::Path(path.clone(), points.get(name)?.clone()))
}
}
}