Ingore clippy warnings about too many arguments

This commit is contained in:
Chris Glass 2026-04-10 18:40:26 +02:00
parent eca9421e87
commit b654808734
2 changed files with 33 additions and 26 deletions

View file

@ -264,6 +264,7 @@ pub struct Terminal {
impl Terminal { impl Terminal {
//TODO: error handling //TODO: error handling
#[allow(clippy::too_many_arguments)]
pub fn new( pub fn new(
pane: pane_grid::Pane, pane: pane_grid::Pane,
entity: segmented_button::Entity, entity: segmented_button::Entity,
@ -860,7 +861,8 @@ impl Terminal {
// Change color if selected // Change color if selected
if let Some(selection) = &term.selection if let Some(selection) = &term.selection
&& let Some(range) = selection.to_range(&term) && let Some(range) = selection.to_range(&term)
&& range.contains(indexed.point) { && range.contains(indexed.point)
{
//TODO: better handling of selection //TODO: better handling of selection
mem::swap(&mut fg, &mut bg); mem::swap(&mut fg, &mut bg);
} }
@ -877,7 +879,8 @@ impl Terminal {
let mut flags = indexed.cell.flags; let mut flags = indexed.cell.flags;
if let Some(active_match) = &self.active_regex_match if let Some(active_match) = &self.active_regex_match
&& active_match.contains(&indexed.point) { && active_match.contains(&indexed.point)
{
flags |= Flags::UNDERLINE; flags |= Flags::UNDERLINE;
} }
if let Some(active_id) = &self.active_hyperlink_id { if let Some(active_id) = &self.active_hyperlink_id {

View file

@ -871,7 +871,8 @@ where
layout.bounds(), layout.bounds(),
self.padding, self.padding,
multiplier, multiplier,
) { )
{
shell.capture_event(); shell.capture_event();
} }
if state.autoscroll.is_active() { if state.autoscroll.is_active() {
@ -1343,7 +1344,8 @@ where
.viewport_to_point(TermPoint::new(row as usize, TermColumn(col as usize))); .viewport_to_point(TermPoint::new(row as usize, TermColumn(col as usize)));
if state.modifiers.control() if state.modifiers.control()
&& let Some(on_open_hyperlink) = &self.on_open_hyperlink && let Some(on_open_hyperlink) = &self.on_open_hyperlink
&& let Some(hyperlink) = get_hyperlink(&terminal, location) { && let Some(hyperlink) = get_hyperlink(&terminal, location)
{
shell.publish(on_open_hyperlink(hyperlink)); shell.publish(on_open_hyperlink(hyperlink));
shell.capture_event(); shell.capture_event();
} }
@ -1651,7 +1653,8 @@ fn update_active_regex_match(
{ {
'update: { 'update: {
if let Some(active_match) = &terminal.active_regex_match if let Some(active_match) = &terminal.active_regex_match
&& active_match == match_ { && active_match == match_
{
break 'update; break 'update;
} }
terminal.active_regex_match = Some(match_.clone()); terminal.active_regex_match = Some(match_.clone());
@ -1713,6 +1716,7 @@ enum EdgeScrollDirection {
Bottom, Bottom,
} }
#[allow(clippy::too_many_arguments)]
fn edge_scroll_adjustment( fn edge_scroll_adjustment(
y: f32, y: f32,
buffer_height: f32, buffer_height: f32,