From 2a9160836bb87fdea3ae891563b0169c68d1c2ab Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Thu, 11 Dec 2025 16:53:03 +0000 Subject: fix: resolve all fmt and clippy warnings Main lib (src/): - Add #[allow(dead_code)] for build_info field (stored to prevent Prometheus unregistration) - Add #[allow(dead_code)] for first_seen field (reserved for future rate limiting) - Replace .or_insert_with(RelaySyncNeeds::default) with .or_default() - Replace manual div_ceil implementations with .div_ceil(100) Test code (tests/): - Replace .expect(&format!(...)) with .unwrap_or_else(|_| panic!(...)) - Remove needless borrows in fetch_metrics() calls - Add #[allow(dead_code)] and #[allow(unused_imports)] to test helpers module grasp-audit: - Apply cargo fmt to fix formatting --- grasp-audit/src/client.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'grasp-audit/src/client.rs') diff --git a/grasp-audit/src/client.rs b/grasp-audit/src/client.rs index 21c70be..259a317 100644 --- a/grasp-audit/src/client.rs +++ b/grasp-audit/src/client.rs @@ -585,7 +585,9 @@ mod tests { "Missing 'grasp-audit-test-event' tag" ); assert!( - tag_contents.iter().any(|t| t.starts_with("audit-isolated-")), + tag_contents + .iter() + .any(|t| t.starts_with("audit-isolated-")), "Missing 'audit-isolated-*' tag" ); assert!( -- cgit v1.2.3