Fix clippy warnings
This commit is contained in:
+2
-1
@@ -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"))
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -920,7 +920,7 @@ fn wrap_line(text: &str, width: usize) -> Vec<String> {
|
||||
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<String> {
|
||||
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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user