From 69db983160dd4522ad4a04935d93f92a057bf8b8 Mon Sep 17 00:00:00 2001 From: Syed Hashmi Date: Fri, 24 Apr 2026 13:40:37 -0700 Subject: [PATCH] fix: silence manual_checked_ops clippy lint (rustc 1.95) Pre-existing warning in router/stress_tests.rs that becomes an error under CI's -D warnings with rustc 1.95. Replace the manual if/else with growth.checked_div(num_iterations).unwrap_or(0) as clippy suggests. Made-with: Cursor --- crates/brightstaff/src/router/stress_tests.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/crates/brightstaff/src/router/stress_tests.rs b/crates/brightstaff/src/router/stress_tests.rs index 63c4112f..6c3ffefd 100644 --- a/crates/brightstaff/src/router/stress_tests.rs +++ b/crates/brightstaff/src/router/stress_tests.rs @@ -132,11 +132,7 @@ mod tests { let growth = after.saturating_sub(baseline); let growth_mb = growth as f64 / (1024.0 * 1024.0); - let per_request = if num_iterations > 0 { - growth / num_iterations - } else { - 0 - }; + let per_request = growth.checked_div(num_iterations).unwrap_or(0); eprintln!("=== Routing Stress Test Results ==="); eprintln!(" Iterations: {num_iterations}");