Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
mxinden committed May 7, 2024
1 parent 5c2aa4c commit 1bfd2f5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
3 changes: 1 addition & 2 deletions neqo-transport/src/fc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,7 @@ impl ReceiverFlowControl<StreamId> {
// 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;
Expand Down
2 changes: 1 addition & 1 deletion neqo-transport/tests/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!(
Expand Down
7 changes: 2 additions & 5 deletions test-fixture/src/sim/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -291,8 +292,4 @@ impl ReadySimulator {
self.sim.print_summary();
sim_time
}

pub fn run(self) {
self.run_sim_time();
}
}

0 comments on commit 1bfd2f5

Please sign in to comment.