Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
fix: remove unused received counter in benchmark
Oladipupo Ayoolafd35e3e37ad1
diff --git a/crates/frame-converter/examples/benchmark.rs b/crates/frame-converter/examples/benchmark.rsindex 04ef56663..2d457dfec 100644--- a/crates/frame-converter/examples/benchmark.rs+++ b/crates/frame-converter/examples/benchmark.rs@@ -63,18 +63,13 @@ fn benchmark_pool(pool.submit(frame, i as u64).expect("Submit failed");}- let mut received = 0u64;let deadline = Instant::now() + Duration::from_secs(30);- while received < frame_count as u64 && Instant::now() < deadline {- if let Some(_converted) = pool.recv_timeout(Duration::from_millis(100)) {- received += 1;- }+ while Instant::now() < deadline {+ let _ = pool.recv_timeout(Duration::from_millis(100));let stats = pool.stats();if stats.frames_converted >= frame_count as u64 {- while pool.try_recv().is_some() {- received += 1;- }+ while pool.try_recv().is_some() {}break;}}