Clippy
Some checks failed
CI / Typos (pull_request) Successful in 12s
CI / Clippy (pull_request) Successful in 59s
CI / Build and test (pull_request) Successful in 1m17s
CI / Check version (pull_request) Failing after 4s

This commit is contained in:
2025-07-13 17:20:09 +00:00
parent cd7d5008dc
commit b3d7b5274b
7 changed files with 120 additions and 10 deletions

View File

@@ -88,6 +88,7 @@ fn main_inner() -> Result<ExitCode> {
let max_tasks = manifest.config.threads.map(|x| x.get()).unwrap_or(1);
debug!("Starting runtime with {max_tasks} threads");
#[expect(clippy::unwrap_used)]
let rt = tokio::runtime::Builder::new_multi_thread()
.worker_threads(3)
.max_blocking_threads(max_tasks)
@@ -116,12 +117,13 @@ fn main_inner() -> Result<ExitCode> {
});
if js.len() >= max_tasks {
#[expect(clippy::unwrap_used)]
js.join_next().await.unwrap()??;
}
}
while let Some(x) = js.join_next().await {
x.unwrap()?
x??
}
return Ok::<_, Error>(());

View File

@@ -1,4 +1,4 @@
use anyhow::{Result, bail};
use anyhow::{bail, Result};
use regex::Regex;
use tracing::warn;

View File

@@ -190,7 +190,7 @@ impl Iterator for PickRuleIterator<'_> {
match value {
PickRule::Plain(task) => {
let mut patterns = current.prefix.clone();
patterns.push(key.to_string());
patterns.push(key.to_owned());
Some(FlatPickRule {
patterns,
@@ -199,7 +199,7 @@ impl Iterator for PickRuleIterator<'_> {
}
PickRule::Nested(nested_rules) => {
let mut prefix = current.prefix.clone();
prefix.push(key.to_string());
prefix.push(key.to_owned());
self.stack.push(PickRuleIterState {
rules: nested_rules,

View File

@@ -1,4 +1,4 @@
use anyhow::{Context, Result, bail};
use anyhow::{bail, Context, Result};
use indicatif::ProgressBar;
use std::{
path::{Path, PathBuf},
@@ -7,7 +7,7 @@ use std::{
use tracing::{error, trace};
use walkdir::WalkDir;
use crate::{Cli, manifest::types::Manifest, style::spinner_style_list, tool::TaskContext};
use crate::{manifest::types::Manifest, style::spinner_style_list, tool::TaskContext, Cli};
pub fn load_manifest(cli: &Cli) -> Result<Manifest> {
let manifest_path_str = cli

View File

@@ -34,7 +34,7 @@ impl PickTool for ToolBash {
debug!("Running `before` script");
let mut temp_file =
tempfile::NamedTempFile::new().context("while creating temporary script")?;
writeln!(temp_file, "{}", script).context("while creating temporary script")?;
writeln!(temp_file, "{script}").context("while creating temporary script")?;
temp_file
}
};
@@ -82,7 +82,7 @@ impl PickTool for ToolBash {
debug!("Running `after` script");
let mut temp_file =
tempfile::NamedTempFile::new().context("while creating temporary script")?;
writeln!(temp_file, "{}", script).context("while creating temporary script")?;
writeln!(temp_file, "{script}").context("while creating temporary script")?;
temp_file
}
};
@@ -131,7 +131,7 @@ impl PickTool for ToolBash {
trace!("Running script for {}: {}", ctx.path_rel_str, ctx.task);
let mut temp_file =
tempfile::NamedTempFile::new().context("while creating temporary script")?;
writeln!(temp_file, "{}", script).context("while creating temporary script")?;
writeln!(temp_file, "{script}").context("while creating temporary script")?;
temp_file
}
};