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
This commit is contained in:
Syed Hashmi 2026-04-24 13:40:37 -07:00
parent 6745c9d342
commit 69db983160
No known key found for this signature in database

View file

@ -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}");