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;