diff --git a/neqo-transport/src/fc.rs b/neqo-transport/src/fc.rs index 7a888eaa1f..730badcd3a 100644 --- a/neqo-transport/src/fc.rs +++ b/neqo-transport/src/fc.rs @@ -386,8 +386,7 @@ impl ReceiverFlowControl { // TODO: Should one also auto-tune down? if self .max_allowed_sent_at - .map(|at| now - at < rtt * 2) - .unwrap_or(false) + .is_some_and(|at| now - at < rtt * 2) && self.max_active < STREAM_MAX_ACTIVE_LIMIT { let prev_max_active = self.max_active; diff --git a/neqo-transport/tests/network.rs b/neqo-transport/tests/network.rs index a10fcd9c67..e35a358d44 100644 --- a/neqo-transport/tests/network.rs +++ b/neqo-transport/tests/network.rs @@ -221,7 +221,7 @@ fn unlimited_bandwidth_50ms_delay_connection() { // TODO: Shouldn't matter. No packet loss. Ideally no randomness in delay. sim.seed_str("117f65d90ee5c1a7fb685f3af502c7730ba5d31866b758d98f5e3c2117cf9b86"); - let simulated_time = sim.setup().run_sim_time(); + let simulated_time = sim.setup().run(); let bandwidth = TRANSFER_AMOUNT as f64 * 8.0 / simulated_time.as_secs_f64(); assert!( diff --git a/test-fixture/src/sim/mod.rs b/test-fixture/src/sim/mod.rs index ff3c1aa16a..77ebcb24ae 100644 --- a/test-fixture/src/sim/mod.rs +++ b/test-fixture/src/sim/mod.rs @@ -279,7 +279,8 @@ pub struct ReadySimulator { } impl ReadySimulator { - pub fn run_sim_time(mut self) -> Duration { + #[allow(clippy::must_use_candidate)] + pub fn run(mut self) -> Duration { let real_start = Instant::now(); let end = self.sim.process_loop(self.start, self.now); let sim_time = end - self.now; @@ -291,8 +292,4 @@ impl ReadySimulator { self.sim.print_summary(); sim_time } - - pub fn run(self) { - self.run_sim_time(); - } }