chore: clippy

This commit is contained in:
Vukašin Vojinović 2025-11-06 12:40:37 +01:00
parent 900dd88a70
commit d20dbadd02
2 changed files with 35 additions and 37 deletions

View file

@ -224,8 +224,8 @@ impl MouseReporter {
}; };
//Generate term codes //Generate term codes
let x_iter = std::iter::repeat(button_no_x).take(lines_x.unsigned_abs() as _); let x_iter = std::iter::repeat_n(button_no_x, lines_x.unsigned_abs() as _);
let y_iter = std::iter::repeat(button_no_y).take(lines_y.unsigned_abs() as _); let y_iter = std::iter::repeat_n(button_no_y, lines_y.unsigned_abs() as _);
x_iter x_iter
.chain(y_iter) .chain(y_iter)

View file

@ -1260,8 +1260,7 @@ where
let col = x / terminal.size().cell_width; let col = x / terminal.size().cell_width;
let row = y / terminal.size().cell_height; let row = y / terminal.size().cell_height;
terminal.scroll_mouse(delta, &state.modifiers, col as u32, row as u32); terminal.scroll_mouse(delta, &state.modifiers, col as u32, row as u32);
} else { } else if terminal.term.lock().mode().contains(TermMode::ALT_SCREEN) {
if terminal.term.lock().mode().contains(TermMode::ALT_SCREEN) {
MouseReporter::report_mouse_wheel_as_arrows( MouseReporter::report_mouse_wheel_as_arrows(
&terminal, &terminal,
terminal.size().cell_width, terminal.size().cell_width,
@ -1300,7 +1299,6 @@ where
} }
} }
} }
}
{ {
let x = p.x - self.padding.left; let x = p.x - self.padding.left;
let y = p.y - self.padding.top; let y = p.y - self.padding.top;