Another batch of lint fixes (#36521)
- **Enable a bunch of extra lints** - **First batch of fixes** - **More fixes** Release Notes: - N/A
This commit is contained in:
parent
69b1c6d6f5
commit
6825715503
147 changed files with 788 additions and 1042 deletions
|
@ -257,7 +257,7 @@ impl DebugPanel {
|
|||
.as_ref()
|
||||
.map(|entity| entity.downgrade()),
|
||||
task_context: task_context.clone(),
|
||||
worktree_id: worktree_id,
|
||||
worktree_id,
|
||||
});
|
||||
};
|
||||
running.resolve_scenario(
|
||||
|
|
|
@ -87,7 +87,7 @@ impl DebugSession {
|
|||
self.stack_trace_view.get_or_init(|| {
|
||||
let stackframe_list = running_state.read(cx).stack_frame_list().clone();
|
||||
|
||||
let stack_frame_view = cx.new(|cx| {
|
||||
cx.new(|cx| {
|
||||
StackTraceView::new(
|
||||
workspace.clone(),
|
||||
project.clone(),
|
||||
|
@ -95,9 +95,7 @@ impl DebugSession {
|
|||
window,
|
||||
cx,
|
||||
)
|
||||
});
|
||||
|
||||
stack_frame_view
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -358,7 +358,7 @@ pub(crate) fn new_debugger_pane(
|
|||
}
|
||||
};
|
||||
|
||||
let ret = cx.new(move |cx| {
|
||||
cx.new(move |cx| {
|
||||
let mut pane = Pane::new(
|
||||
workspace.clone(),
|
||||
project.clone(),
|
||||
|
@ -562,9 +562,7 @@ pub(crate) fn new_debugger_pane(
|
|||
}
|
||||
});
|
||||
pane
|
||||
});
|
||||
|
||||
ret
|
||||
})
|
||||
}
|
||||
|
||||
pub struct DebugTerminal {
|
||||
|
|
|
@ -329,8 +329,8 @@ impl BreakpointList {
|
|||
let text = self.input.read(cx).text(cx);
|
||||
|
||||
match mode {
|
||||
ActiveBreakpointStripMode::Log => match &entry.kind {
|
||||
BreakpointEntryKind::LineBreakpoint(line_breakpoint) => {
|
||||
ActiveBreakpointStripMode::Log => {
|
||||
if let BreakpointEntryKind::LineBreakpoint(line_breakpoint) = &entry.kind {
|
||||
Self::edit_line_breakpoint_inner(
|
||||
&self.breakpoint_store,
|
||||
line_breakpoint.breakpoint.path.clone(),
|
||||
|
@ -339,10 +339,9 @@ impl BreakpointList {
|
|||
cx,
|
||||
);
|
||||
}
|
||||
_ => {}
|
||||
},
|
||||
ActiveBreakpointStripMode::Condition => match &entry.kind {
|
||||
BreakpointEntryKind::LineBreakpoint(line_breakpoint) => {
|
||||
}
|
||||
ActiveBreakpointStripMode::Condition => {
|
||||
if let BreakpointEntryKind::LineBreakpoint(line_breakpoint) = &entry.kind {
|
||||
Self::edit_line_breakpoint_inner(
|
||||
&self.breakpoint_store,
|
||||
line_breakpoint.breakpoint.path.clone(),
|
||||
|
@ -351,10 +350,9 @@ impl BreakpointList {
|
|||
cx,
|
||||
);
|
||||
}
|
||||
_ => {}
|
||||
},
|
||||
ActiveBreakpointStripMode::HitCondition => match &entry.kind {
|
||||
BreakpointEntryKind::LineBreakpoint(line_breakpoint) => {
|
||||
}
|
||||
ActiveBreakpointStripMode::HitCondition => {
|
||||
if let BreakpointEntryKind::LineBreakpoint(line_breakpoint) = &entry.kind {
|
||||
Self::edit_line_breakpoint_inner(
|
||||
&self.breakpoint_store,
|
||||
line_breakpoint.breakpoint.path.clone(),
|
||||
|
@ -363,8 +361,7 @@ impl BreakpointList {
|
|||
cx,
|
||||
);
|
||||
}
|
||||
_ => {}
|
||||
},
|
||||
}
|
||||
}
|
||||
self.focus_handle.focus(window);
|
||||
} else {
|
||||
|
@ -426,13 +423,10 @@ impl BreakpointList {
|
|||
return;
|
||||
};
|
||||
|
||||
match &mut entry.kind {
|
||||
BreakpointEntryKind::LineBreakpoint(line_breakpoint) => {
|
||||
let path = line_breakpoint.breakpoint.path.clone();
|
||||
let row = line_breakpoint.breakpoint.row;
|
||||
self.edit_line_breakpoint(path, row, BreakpointEditAction::Toggle, cx);
|
||||
}
|
||||
_ => {}
|
||||
if let BreakpointEntryKind::LineBreakpoint(line_breakpoint) = &mut entry.kind {
|
||||
let path = line_breakpoint.breakpoint.path.clone();
|
||||
let row = line_breakpoint.breakpoint.row;
|
||||
self.edit_line_breakpoint(path, row, BreakpointEditAction::Toggle, cx);
|
||||
}
|
||||
cx.notify();
|
||||
}
|
||||
|
@ -967,7 +961,7 @@ impl LineBreakpoint {
|
|||
props,
|
||||
breakpoint: BreakpointEntry {
|
||||
kind: BreakpointEntryKind::LineBreakpoint(self.clone()),
|
||||
weak: weak,
|
||||
weak,
|
||||
},
|
||||
is_selected,
|
||||
focus_handle,
|
||||
|
@ -1179,7 +1173,7 @@ impl ExceptionBreakpoint {
|
|||
props,
|
||||
breakpoint: BreakpointEntry {
|
||||
kind: BreakpointEntryKind::ExceptionBreakpoint(self.clone()),
|
||||
weak: weak,
|
||||
weak,
|
||||
},
|
||||
is_selected,
|
||||
focus_handle,
|
||||
|
|
|
@ -947,7 +947,7 @@ impl VariableList {
|
|||
#[track_caller]
|
||||
#[cfg(test)]
|
||||
pub(crate) fn assert_visual_entries(&self, expected: Vec<&str>) {
|
||||
const INDENT: &'static str = " ";
|
||||
const INDENT: &str = " ";
|
||||
|
||||
let entries = &self.entries;
|
||||
let mut visual_entries = Vec::with_capacity(entries.len());
|
||||
|
|
|
@ -1445,11 +1445,8 @@ async fn test_variable_list_only_sends_requests_when_rendering(
|
|||
|
||||
cx.run_until_parked();
|
||||
|
||||
let running_state = active_debug_session_panel(workspace, cx).update_in(cx, |item, _, _| {
|
||||
let state = item.running_state().clone();
|
||||
|
||||
state
|
||||
});
|
||||
let running_state = active_debug_session_panel(workspace, cx)
|
||||
.update_in(cx, |item, _, _| item.running_state().clone());
|
||||
|
||||
client
|
||||
.fake_event(dap::messages::Events::Stopped(dap::StoppedEvent {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue