From 93cc045527b5f144557b42ab53fc56119935aa63 Mon Sep 17 00:00:00 2001 From: pragmaxim Date: Tue, 11 Jun 2024 11:08:49 +0200 Subject: [PATCH] bug-fix --- .gitignore | 1 + src/lib.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 1a60964..8847d1b 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ Cargo.lock **/*.rs.bk .idea +/.vscode/ \ No newline at end of file diff --git a/src/lib.rs b/src/lib.rs index fd1113d..f8e9136 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -130,6 +130,7 @@ where me.items.push(item); *me.current_batch_size += new_count; if me.current_batch_size >= me.min_batch_size { + *me.current_batch_size = 0; return Poll::Ready(Some(std::mem::take(me.items))); } }