[router] Fix all unused_qualifications (#11341)

This commit is contained in:
Chang Su
2025-10-08 13:55:27 -07:00
committed by GitHub
parent a65ca73911
commit a1080b72a0
12 changed files with 40 additions and 42 deletions

View File

@@ -804,7 +804,7 @@ impl WorkerFactory {
}
}
tokio::time::sleep(Duration::from_secs(1)).await;
time::sleep(Duration::from_secs(1)).await;
}
}
}
@@ -900,7 +900,7 @@ pub fn start_health_checker(
let shutdown_clone = shutdown.clone();
let handle = tokio::spawn(async move {
let mut interval = tokio::time::interval(Duration::from_secs(check_interval_secs));
let mut interval = time::interval(Duration::from_secs(check_interval_secs));
// Counter for periodic load reset (every 10 health check cycles)
let mut check_count = 0u64;
@@ -1272,7 +1272,7 @@ mod tests {
let worker_clone = Arc::clone(&worker);
let handle = tokio::spawn(async move {
worker_clone.set_healthy(i % 2 == 0);
tokio::time::sleep(Duration::from_micros(10)).await;
time::sleep(Duration::from_micros(10)).await;
});
handles.push(handle);
}

View File

@@ -1180,7 +1180,7 @@ impl WorkerManager {
});
}
let results = futures::future::join_all(tasks).await;
let results = future::join_all(tasks).await;
let mut successful = Vec::new();
let mut failed = Vec::new();
@@ -1321,7 +1321,7 @@ impl WorkerManager {
});
}
let loads = futures::future::join_all(tasks).await;
let loads = future::join_all(tasks).await;
let successful = loads.iter().filter(|l| l.load >= 0).count();
let failed = loads.iter().filter(|l| l.load < 0).count();

View File

@@ -388,7 +388,7 @@ impl WorkerRegistry {
}
// Get all workers from registry
let workers: Vec<Arc<dyn crate::core::Worker>> = workers_ref
let workers: Vec<Arc<dyn Worker>> = workers_ref
.iter()
.map(|entry| entry.value().clone())
.collect();