From 9ceb26bb5c8f0511aeaaf61149c1393c7ba72133 Mon Sep 17 00:00:00 2001 From: asonix Date: Sun, 7 Jan 2024 10:09:06 -0600 Subject: [PATCH] Clippy --- src/queue.rs | 2 +- src/stream.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/queue.rs b/src/queue.rs index 17bd0bd..b4ed9e6 100644 --- a/src/queue.rs +++ b/src/queue.rs @@ -452,7 +452,7 @@ where loop { tracing::trace!("heartbeat: looping"); count += 1; - count = count % yield_limit; + count %= yield_limit; // yield every 8 iterations to be kind to other tasks if count == 0 { diff --git a/src/stream.rs b/src/stream.rs index f03ec31..65b6547 100644 --- a/src/stream.rs +++ b/src/stream.rs @@ -83,7 +83,7 @@ where tracing::trace!("from_iterator: looping"); count += 1; - count = count % yield_count; + count %= yield_count; yielder.yield_(res).await;