feat: enhance strictness of Rust compiler settings and improve code quality by treating warnings as errors
This commit is contained in:
+2
-4
@@ -63,8 +63,7 @@ impl Tool for Bash {
|
||||
.and_then(|v| v.as_str())
|
||||
.ok_or_else(|| anyhow!("missing required argument: command"))?
|
||||
.to_string();
|
||||
let _description = args.get("description").and_then(|v| v.as_str()).unwrap_or("");
|
||||
let timeout_ms = args.get("timeout").and_then(|v| v.as_u64()).unwrap_or(120000).min(600000);
|
||||
let timeout_ms = args.get("timeout").and_then(|v| v.as_u64()).unwrap_or(120_000).min(600_000);
|
||||
// Only gate destructive git operations; credential reads are allowed
|
||||
// locally since the AI needs access, and the real threat is committing
|
||||
// secrets to a public repo (handled by git pre-commit hooks / user).
|
||||
@@ -100,9 +99,8 @@ impl Tool for Bash {
|
||||
} else {
|
||||
format!("{}\n\nExit code: 0 ({:.2}s)", trimmed, elapsed)
|
||||
});
|
||||
} else {
|
||||
return Ok(format!("{}\n\nExit code: {} ({:.2}s)", trimmed, status.code().unwrap_or(-1), elapsed));
|
||||
}
|
||||
return Ok(format!("{}\n\nExit code: {} ({:.2}s)", trimmed, status.code().unwrap_or(-1), elapsed));
|
||||
}
|
||||
Ok(None) => {
|
||||
if start.elapsed() > timeout {
|
||||
|
||||
Reference in New Issue
Block a user