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
|
@ -2756,7 +2756,7 @@ impl GitPanel {
|
|||
for pending in self.pending.iter() {
|
||||
if pending.target_status == TargetStatus::Staged {
|
||||
pending_staged_count += pending.entries.len();
|
||||
last_pending_staged = pending.entries.iter().next().cloned();
|
||||
last_pending_staged = pending.entries.first().cloned();
|
||||
}
|
||||
if let Some(single_staged) = &single_staged_entry {
|
||||
if pending
|
||||
|
@ -5261,7 +5261,7 @@ mod tests {
|
|||
project
|
||||
.read(cx)
|
||||
.worktrees(cx)
|
||||
.nth(0)
|
||||
.next()
|
||||
.unwrap()
|
||||
.read(cx)
|
||||
.as_local()
|
||||
|
@ -5386,7 +5386,7 @@ mod tests {
|
|||
project
|
||||
.read(cx)
|
||||
.worktrees(cx)
|
||||
.nth(0)
|
||||
.next()
|
||||
.unwrap()
|
||||
.read(cx)
|
||||
.as_local()
|
||||
|
@ -5437,7 +5437,7 @@ mod tests {
|
|||
project
|
||||
.read(cx)
|
||||
.worktrees(cx)
|
||||
.nth(0)
|
||||
.next()
|
||||
.unwrap()
|
||||
.read(cx)
|
||||
.as_local()
|
||||
|
@ -5486,7 +5486,7 @@ mod tests {
|
|||
project
|
||||
.read(cx)
|
||||
.worktrees(cx)
|
||||
.nth(0)
|
||||
.next()
|
||||
.unwrap()
|
||||
.read(cx)
|
||||
.as_local()
|
||||
|
|
|
@ -280,7 +280,7 @@ impl ProjectDiff {
|
|||
fn button_states(&self, cx: &App) -> ButtonStates {
|
||||
let editor = self.editor.read(cx);
|
||||
let snapshot = self.multibuffer.read(cx).snapshot(cx);
|
||||
let prev_next = snapshot.diff_hunks().skip(1).next().is_some();
|
||||
let prev_next = snapshot.diff_hunks().nth(1).is_some();
|
||||
let mut selection = true;
|
||||
|
||||
let mut ranges = editor
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue