use implicit iter loops (clippy::explicit_iter_loop)

This commit is contained in:
Daniel Eades 2024-04-14 21:09:14 +01:00 committed by Jeremy Soller
parent de6f48a951
commit 89174c5e0d
4 changed files with 10 additions and 10 deletions

View file

@ -165,7 +165,7 @@ where
// Calculate layout lines
terminal.with_buffer(|buffer| {
let mut layout_lines = 0;
for line in buffer.lines.iter() {
for line in &buffer.lines {
match line.layout_opt() {
Some(layout) => layout_lines += layout.len(),
None => (),
@ -480,7 +480,7 @@ where
view_position,
metadata_set,
};
for glyph in run.glyphs.iter() {
for glyph in run.glyphs {
bg_rect.update(glyph, renderer, state.is_focused);
}
bg_rect.fill(renderer, state.is_focused);
@ -598,7 +598,7 @@ where
modifiers,
..
}) if state.is_focused => {
for (key_bind, _) in self.key_binds.iter() {
for (key_bind, _) in &self.key_binds {
if key_bind.matches(modifiers, &Key::Named(named)) {
return Status::Captured;
}
@ -741,7 +741,7 @@ where
key,
..
}) if state.is_focused => {
for (key_bind, _) in self.key_binds.iter() {
for (key_bind, _) in &self.key_binds {
if key_bind.matches(modifiers, &key) {
return Status::Captured;
}