fix: resolve all clippy warnings with RUSTFLAGS="-D warnings"
All checks were successful
CI / Clippy (push) Successful in 4m15s
CI / Security Audit (push) Has been skipped
CI / Tests (push) Has been skipped
CI / Clippy (pull_request) Successful in 4m16s
CI / Security Audit (pull_request) Has been skipped
CI / Tests (pull_request) Has been skipped
CI / Detect Changes (push) Has been skipped
CI / Detect Changes (pull_request) Has been skipped
CI / Deploy Agent (push) Has been skipped
CI / Deploy Dashboard (push) Has been skipped
CI / Deploy Docs (push) Has been skipped
CI / Deploy MCP (push) Has been skipped
CI / Deploy Agent (pull_request) Has been skipped
CI / Deploy Dashboard (pull_request) Has been skipped
CI / Deploy Docs (pull_request) Has been skipped
CI / Deploy MCP (pull_request) Has been skipped
CI / Format (push) Successful in 27s
CI / Format (pull_request) Successful in 3s
All checks were successful
CI / Clippy (push) Successful in 4m15s
CI / Security Audit (push) Has been skipped
CI / Tests (push) Has been skipped
CI / Clippy (pull_request) Successful in 4m16s
CI / Security Audit (pull_request) Has been skipped
CI / Tests (pull_request) Has been skipped
CI / Detect Changes (push) Has been skipped
CI / Detect Changes (pull_request) Has been skipped
CI / Deploy Agent (push) Has been skipped
CI / Deploy Dashboard (push) Has been skipped
CI / Deploy Docs (push) Has been skipped
CI / Deploy MCP (push) Has been skipped
CI / Deploy Agent (pull_request) Has been skipped
CI / Deploy Dashboard (pull_request) Has been skipped
CI / Deploy Docs (pull_request) Has been skipped
CI / Deploy MCP (pull_request) Has been skipped
CI / Format (push) Successful in 27s
CI / Format (pull_request) Successful in 3s
Fix dead code warnings, redundant clones, boolean simplification, format-in-format-args, type complexity, and Box::new of Default across compliance-dast, compliance-agent, and compliance-dashboard. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -33,8 +33,15 @@ pub struct ToolRegistry {
|
||||
tools: HashMap<String, Box<dyn PentestTool>>,
|
||||
}
|
||||
|
||||
impl Default for ToolRegistry {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl ToolRegistry {
|
||||
/// Create a new registry with all built-in tools pre-registered.
|
||||
#[allow(clippy::expect_used)]
|
||||
pub fn new() -> Self {
|
||||
let http = reqwest::Client::builder()
|
||||
.danger_accept_invalid_certs(true)
|
||||
@@ -67,8 +74,11 @@ impl ToolRegistry {
|
||||
);
|
||||
|
||||
// New infrastructure / analysis tools
|
||||
register(&mut tools, Box::new(dns_checker::DnsCheckerTool::new()));
|
||||
register(&mut tools, Box::new(dmarc_checker::DmarcCheckerTool::new()));
|
||||
register(&mut tools, Box::<dns_checker::DnsCheckerTool>::default());
|
||||
register(
|
||||
&mut tools,
|
||||
Box::<dmarc_checker::DmarcCheckerTool>::default(),
|
||||
);
|
||||
register(
|
||||
&mut tools,
|
||||
Box::new(tls_analyzer::TlsAnalyzerTool::new(http.clone())),
|
||||
|
||||
Reference in New Issue
Block a user