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 --- tests/sync/live_sync.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tests/sync/live_sync.rs') diff --git a/tests/sync/live_sync.rs b/tests/sync/live_sync.rs index ebe1c0b..7fa08a0 100644 --- a/tests/sync/live_sync.rs +++ b/tests/sync/live_sync.rs @@ -229,7 +229,10 @@ async fn test_live_sync_layer3_events() { .send_event(&comment) .await .expect("Failed to send comment"); - println!("Layer 3 comment {} sent to relay_a BEFORE Layer 3 subscription established", comment_id); + println!( + "Layer 3 comment {} sent to relay_a BEFORE Layer 3 subscription established", + comment_id + ); // 6. Now wait for issue to sync to relay_b (this triggers Layer 3 filter creation) tokio::time::sleep(Duration::from_secs(2)).await; @@ -394,7 +397,7 @@ async fn test_live_sync_event_ordering() { client_a .send_event(&issue) .await - .expect(&format!("Failed to send issue {}", i)); + .unwrap_or_else(|_| panic!("Failed to send issue {}", i)); // Delay between events to ensure different timestamps tokio::time::sleep(Duration::from_millis(150)).await; -- cgit v1.2.3