Fix iterator related clippy style lint violations (#36437)
Release Notes: - N/A
This commit is contained in:
parent
176c445817
commit
1fbb318714
13 changed files with 21 additions and 33 deletions
|
@ -503,8 +503,7 @@ fn update_editor_selection(
|
|||
&[last_kept_hunk_end..editor::Anchor::max()],
|
||||
buffer_snapshot,
|
||||
)
|
||||
.skip(1)
|
||||
.next()
|
||||
.nth(1)
|
||||
})
|
||||
.or_else(|| {
|
||||
let first_kept_hunk = diff_hunks.first()?;
|
||||
|
|
|
@ -690,11 +690,7 @@ impl MessageEditor {
|
|||
.as_ref()
|
||||
.map(|model| {
|
||||
self.incompatible_tools_state.update(cx, |state, cx| {
|
||||
state
|
||||
.incompatible_tools(&model.model, cx)
|
||||
.iter()
|
||||
.cloned()
|
||||
.collect::<Vec<_>>()
|
||||
state.incompatible_tools(&model.model, cx).to_vec()
|
||||
})
|
||||
})
|
||||
.unwrap_or_default();
|
||||
|
|
|
@ -747,11 +747,7 @@ impl TextThreadEditor {
|
|||
self.context.read(cx).invoked_slash_command(&command_id)
|
||||
{
|
||||
if let InvokedSlashCommandStatus::Finished = invoked_slash_command.status {
|
||||
let run_commands_in_ranges = invoked_slash_command
|
||||
.run_commands_in_ranges
|
||||
.iter()
|
||||
.cloned()
|
||||
.collect::<Vec<_>>();
|
||||
let run_commands_in_ranges = invoked_slash_command.run_commands_in_ranges.clone();
|
||||
for range in run_commands_in_ranges {
|
||||
let commands = self.context.update(cx, |context, cx| {
|
||||
context.reparse(cx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue