From e42d424e9f2396d14bbea904fcaaea605494e562 Mon Sep 17 00:00:00 2001 From: Lochnair Date: Wed, 28 Oct 2026 13:54:48 +0000 Subject: [PATCH] fix(ci): resolve Clippy errors exposed by restored builds --- src/controller.rs | 4 ++++ src/ratecontroller.rs | 4 ++++ src/reflector_selector.rs | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/controller.rs b/src/controller.rs index 1573c13..4572985 100644 --- a/src/controller.rs +++ b/src/controller.rs @@ -42,6 +42,10 @@ pub struct Controller { } impl Controller { + #[allow( + clippy::too_many_arguments, + reason = "Constructor wires the controller channels and shared stream state" + )] pub fn new( reflector_rx: Receiver>, icmp_binding_tx: Sender>, diff --git a/src/ratecontroller.rs b/src/ratecontroller.rs index d35e205..867e299 100644 --- a/src/ratecontroller.rs +++ b/src/ratecontroller.rs @@ -150,6 +150,10 @@ pub struct Ratecontroller { } impl Ratecontroller { + #[allow( + clippy::too_many_arguments, + reason = "Constructor injects independent runtime and test backends" + )] fn new_with_backends( settings: Settings, control_snapshot_rx: Receiver, diff --git a/src/reflector_selector.rs b/src/reflector_selector.rs index 3cbbc89..e1993a6 100644 --- a/src/reflector_selector.rs +++ b/src/reflector_selector.rs @@ -235,7 +235,7 @@ impl ReflectorSelector { } // Sort the candidates table now by ascending RTT - candidates.sort_by(|a, b| a.1.cmp(&b.1)); + candidates.sort_by_key(|candidate| candidate.1); // Now we will just limit the candidates down to 2 * num_reflectors let num_reflectors = self.settings.reflectors.num_reflectors;