diff --git a/crates/dinopkg-cli/src/command/init.rs b/crates/dinopkg-cli/src/command/init.rs index 533e74b..8b6bb9c 100644 --- a/crates/dinopkg-cli/src/command/init.rs +++ b/crates/dinopkg-cli/src/command/init.rs @@ -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(()) diff --git a/crates/dinopkg-cli/src/command/run.rs b/crates/dinopkg-cli/src/command/run.rs index c439a6f..4d56fc0 100644 --- a/crates/dinopkg-cli/src/command/run.rs +++ b/crates/dinopkg-cli/src/command/run.rs @@ -41,8 +41,8 @@ pub async fn run(script_name: Option) -> 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()); } } } diff --git a/crates/dinopkg-package-json/src/lib.rs b/crates/dinopkg-package-json/src/lib.rs index 89ef6ad..09fdf6b 100644 --- a/crates/dinopkg-package-json/src/lib.rs +++ b/crates/dinopkg-package-json/src/lib.rs @@ -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 {