Skip to content

Commit fd35e3e

Browse files
committed
fix: remove unused received counter in benchmark
1 parent 59b3998 commit fd35e3e

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

crates/frame-converter/examples/benchmark.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,13 @@ fn benchmark_pool(
6363
pool.submit(frame, i as u64).expect("Submit failed");
6464
}
6565

66-
let mut received = 0u64;
6766
let deadline = Instant::now() + Duration::from_secs(30);
6867

69-
while received < frame_count as u64 && Instant::now() < deadline {
70-
if let Some(_converted) = pool.recv_timeout(Duration::from_millis(100)) {
71-
received += 1;
72-
}
68+
while Instant::now() < deadline {
69+
let _ = pool.recv_timeout(Duration::from_millis(100));
7370
let stats = pool.stats();
7471
if stats.frames_converted >= frame_count as u64 {
75-
while pool.try_recv().is_some() {
76-
received += 1;
77-
}
72+
while pool.try_recv().is_some() {}
7873
break;
7974
}
8075
}

0 commit comments

Comments
 (0)