mirror of
https://github.com/SkyfallWasTaken/dinopkg.git
synced 2024-11-10 04:39:39 +00:00
Placate Clippy
This commit is contained in:
parent
a66c7ee399
commit
f742244f95
3 changed files with 6 additions and 5 deletions
|
@ -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(())
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue