mirror of
https://github.com/katanemo/plano.git
synced 2026-06-11 15:05:14 +02:00
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:
parent
6745c9d342
commit
69db983160
1 changed files with 1 additions and 5 deletions
|
|
@ -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}");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue