Placate clippy lints for 1.86 (#2708)

This commit is contained in:
Casey Rodarmor 2025-04-14 09:05:43 -07:00 committed by GitHub
parent 9322ee5357
commit 6ac3c703bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 15 additions and 13 deletions

View file

@ -131,7 +131,7 @@ impl<'src> Justfile<'src> {
arguments: arguments.clone(),
status,
});
};
}
if let Some(signal) = caught {
return Err(Error::Interrupted { signal });

View file

@ -297,7 +297,7 @@ impl<'src> Lexer<'src> {
self.lex_body()?;
} else {
self.lex_normal(first)?;
};
}
}
None => break,
}
@ -402,7 +402,7 @@ impl<'src> Lexer<'src> {
}
self.token(Whitespace);
};
}
Ok(())
}

View file

@ -1065,7 +1065,7 @@ impl<'run, 'src> Parser<'run, 'src> {
return Err(self.unexpected_token()?);
}
}
};
}
lines.push(Line { fragments, number });
}

View file

@ -251,11 +251,12 @@ impl<'src, D> Recipe<'src, D> {
|| (context.module.settings.quiet && !self.no_quiet())
|| config.verbosity.quiet())
{
let color = config
.highlight
.then(|| config.color.command(config.command_color))
.unwrap_or(config.color)
.stderr();
let color = if config.highlight {
config.color.command(config.command_color)
} else {
config.color
}
.stderr();
if config.timestamp {
eprint!(
@ -327,7 +328,7 @@ impl<'src, D> Recipe<'src, D> {
io_error,
});
}
};
}
if !infallible_line {
if let Some(signal) = caught {

View file

@ -34,7 +34,7 @@ impl<'line> Shebang<'line> {
self
.interpreter
.split(['/', '\\'])
.last()
.next_back()
.unwrap_or(self.interpreter)
}

View file

@ -10,7 +10,7 @@ impl Display for ShowWhitespace<'_> {
'\t' => write!(f, "")?,
' ' => write!(f, "")?,
_ => write!(f, "{c}")?,
};
}
}
Ok(())

View file

@ -83,7 +83,8 @@ impl SignalHandler {
);
for (&child, command) in &self.children {
message.push_str(&format!("{child}: {command:?}\n"));
use std::fmt::Write;
writeln!(message, "{child}: {command:?}").unwrap();
}
eprint!("{message}");