Fix all auto-fix from clippy

This commit is contained in:
Chris Glass 2026-04-10 18:09:25 +02:00
parent c8b18c2827
commit f50ece41eb
5 changed files with 63 additions and 105 deletions

View file

@ -858,14 +858,12 @@ impl Terminal {
}
// Change color if selected
if let Some(selection) = &term.selection {
if let Some(range) = selection.to_range(&term) {
if range.contains(indexed.point) {
if let Some(selection) = &term.selection
&& let Some(range) = selection.to_range(&term)
&& range.contains(indexed.point) {
//TODO: better handling of selection
mem::swap(&mut fg, &mut bg);
}
}
}
// Convert foreground to linear
attrs = attrs.color(fg);
@ -878,11 +876,10 @@ impl Terminal {
let mut flags = indexed.cell.flags;
if let Some(active_match) = &self.active_regex_match {
if active_match.contains(&indexed.point) {
if let Some(active_match) = &self.active_regex_match
&& active_match.contains(&indexed.point) {
flags |= Flags::UNDERLINE;
}
}
if let Some(active_id) = &self.active_hyperlink_id {
let mut matches_active = indexed
.cell
@ -1190,14 +1187,13 @@ impl<'a, T> Iterator for HintPostProcessor<'a, T> {
fn next(&mut self) -> Option<Self::Item> {
let next_match = self.next_match.take()?;
if self.start <= self.end {
if let Some(rm) = self
if self.start <= self.end
&& let Some(rm) = self
.term
.regex_search_right(self.regex, self.start, self.end)
{
self.next_processed_match(rm);
}
}
Some(next_match)
}