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))); } }