Fix clippy::uninlined_format_args (pedantic)

https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
Anders Kaseorg 2022-11-21 19:14:01 -08:00 committed by Charlie Marsh
parent 3205473612
commit 9a66cf2ffb
15 changed files with 29 additions and 29 deletions

View file

@ -106,7 +106,7 @@ pub fn main(cli: &Cli) -> Result<()> {
2 => "Tens",
1 => "Hundreds",
0 => "Category",
_ => panic!("Invalid prefix: {}", prefix),
_ => panic!("Invalid prefix: {prefix}"),
};
gen = gen.line(format!(
"CheckCodePrefix::{prefix} => PrefixSpecificity::{},",
@ -132,10 +132,10 @@ pub fn main(cli: &Cli) -> Result<()> {
// Write the output to `src/checks_gen.rs` (or stdout).
if cli.dry_run {
println!("{}", output);
println!("{output}");
} else {
let mut f = OpenOptions::new().write(true).truncate(true).open(FILE)?;
write!(f, "{}", output)?;
write!(f, "{output}")?;
}
Ok(())