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:
parent
df9c2aefb1
commit
05fc0c432c
239 changed files with 854 additions and 1015 deletions
|
@ -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> {
|
||||
|
|
|
@ -103,7 +103,6 @@ impl Vim {
|
|||
window.dispatch_keystroke(keystroke, cx);
|
||||
});
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
pub fn handle_literal_input(
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -120,7 +120,6 @@ impl Vim {
|
|||
});
|
||||
})
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
fn open_path_mark(
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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()))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue