Placate Clippy

This commit is contained in:
SkyfallWasTaken 2024-07-15 21:05:52 +01:00
parent a66c7ee399
commit f742244f95
3 changed files with 6 additions and 5 deletions

View file

@ -108,7 +108,7 @@ pub async fn init() -> Result<()> {
for line in LinesWithEndings::from(&output) {
let ranges: Vec<(Style, &str)> = h.highlight_line(line, &ps).unwrap();
let escaped = as_24_bit_terminal_escaped(&ranges[..], false);
print!("{}", escaped);
print!("{escaped}");
}
println!("\x1b[0m");
@ -124,7 +124,7 @@ pub async fn init() -> Result<()> {
package_json.name.purple()
);
} else {
println!("{}", "Cancelled.".bold().red())
println!("{}", "Cancelled.".bold().red());
}
Ok(())

View file

@ -41,8 +41,8 @@ pub async fn run(script_name: Option<String>) -> Result<()> {
}
_ => {
println!("{}", "Available scripts:".bold().underline());
for (key, val) in scripts.iter() {
println!("{} - {}", key.bold(), val.dimmed())
for (key, val) in &scripts {
println!("{} - {}", key.bold(), val.dimmed());
}
}
}

View file

@ -29,8 +29,9 @@ pub struct PackageJson {
}
// serde :/
#[allow(clippy::trivially_copy_pass_by_ref)]
fn is_false(value: &bool) -> bool {
!*value
!value
}
fn default_as_false() -> bool {