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

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:
Sharang Parnerkar
2026-03-13 08:46:21 +01:00
parent 4e95fd7016
commit ab17a7376a
15 changed files with 51 additions and 36 deletions

View File

@@ -2,6 +2,9 @@ use dioxus::prelude::*;
use super::helpers::*;
/// (phase_index, steps, findings_count, has_failed, has_running, all_done)
type PhaseData<'a> = (usize, Vec<&'a serde_json::Value>, usize, bool, bool, bool);
#[component]
pub fn AttackChainView(
steps: Vec<serde_json::Value>,
@@ -58,7 +61,7 @@ pub fn AttackChainView(
};
// Build phase data for rail and accordion
let phase_data: Vec<(usize, Vec<&serde_json::Value>, usize, bool, bool, bool)> = phases
let phase_data: Vec<PhaseData<'_>> = phases
.iter()
.enumerate()
.map(|(pi, indices)| {
@@ -211,7 +214,7 @@ pub fn AttackChainView(
// Phase accordion
div { class: "ac-phases",
for (pi, (_, phase_steps, phase_findings, has_failed, has_running, all_done)) in phase_data.iter().enumerate() {
for (pi, (_, phase_steps, phase_findings, _has_failed, has_running, _all_done)) in phase_data.iter().enumerate() {
{
let open_cls = if pi == 0 { " open" } else { "" };
let phase_label = phase_name(pi);