[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);

View File

@@ -606,7 +606,7 @@ impl WorkerFactory {
/// Get DP size from a worker
async fn get_worker_dp_size(url: &str, api_key: &Option<String>) -> WorkerResult<usize> {
let mut req_builder = WORKER_CLIENT.get(&format!("{}/get_server_info", url));
let mut req_builder = WORKER_CLIENT.get(format!("{}/get_server_info", url));
if let Some(key) = api_key {
req_builder = req_builder.bearer_auth(key);