diff --git a/src/tools/shell.rs b/src/tools/shell.rs index 205d7abe..1963beba 100644 --- a/src/tools/shell.rs +++ b/src/tools/shell.rs @@ -440,6 +440,7 @@ impl ShellManager { } /// Execute a shell command with stdin/TTY options. + #[allow(clippy::too_many_arguments)] pub fn execute_with_options( &mut self, command: &str, @@ -1413,7 +1414,7 @@ impl ShellInteractTool { } } -fn required_task_id<'a>(input: &'a serde_json::Value) -> Result<&'a str, ToolError> { +fn required_task_id(input: &serde_json::Value) -> Result<&str, ToolError> { input .get("task_id") .or_else(|| input.get("id")) diff --git a/src/tools/sports.rs b/src/tools/sports.rs index f6e30d36..41fab9ff 100644 --- a/src/tools/sports.rs +++ b/src/tools/sports.rs @@ -152,6 +152,7 @@ fn map_league(league: &str) -> Result<(String, String), ToolError> { } } +#[allow(clippy::too_many_arguments)] async fn fetch_schedule( client: &reqwest::Client, sport: &str, diff --git a/src/tools/subagent.rs b/src/tools/subagent.rs index 1cd75a9a..bcf7577e 100644 --- a/src/tools/subagent.rs +++ b/src/tools/subagent.rs @@ -1014,7 +1014,7 @@ async fn run_subagent_task(task: SubAgentTask) { } } -#[allow(clippy::too_many_lines)] +#[allow(clippy::too_many_arguments, clippy::too_many_lines)] async fn run_subagent( runtime: &SubAgentRuntime, agent_id: String, diff --git a/src/tools/web_run.rs b/src/tools/web_run.rs index ae8a9157..5443d239 100644 --- a/src/tools/web_run.rs +++ b/src/tools/web_run.rs @@ -920,7 +920,7 @@ fn wrap_line(text: &str, width: usize) -> Vec { for word in text.split_whitespace() { if current.is_empty() { current.push_str(word); - } else if current.len() + word.len() + 1 <= width { + } else if current.len() + word.len() < width { current.push(' '); current.push_str(word); } else { @@ -1000,9 +1000,7 @@ fn extract_query_param(url: &str, key: &str) -> Option { let query_start = url.find('?')?; let query = &url[query_start + 1..]; for part in query.split('&') { - let mut pieces = part.splitn(2, '='); - let k = pieces.next()?; - let v = pieces.next()?; + let (k, v) = part.split_once('=')?; if k == key { return Some(v.to_string()); }