[router] clean up lint warnings with clippy execution (#9201)

This commit is contained in:
Jeff Nettleton
2025-08-15 11:01:21 -07:00
committed by GitHub
parent 21b8846066
commit d7e38b2f6d
10 changed files with 39 additions and 38 deletions

View File

@@ -33,7 +33,7 @@ impl BackoffCalculator {
}
// Apply jitter in range [-j, +j]
let jitter = config.jitter_factor.max(0.0).min(1.0);
let jitter = config.jitter_factor.clamp(0.0, 1.0);
if jitter > 0.0 {
let mut rng = rand::rng();
let jitter_scale: f32 = rng.random_range(-jitter..=jitter);