diff --git a/futures-util/src/stream/stream/ready_chunks.rs b/futures-util/src/stream/stream/ready_chunks.rs index ab8637f27..a077a7173 100644 --- a/futures-util/src/stream/stream/ready_chunks.rs +++ b/futures-util/src/stream/stream/ready_chunks.rs @@ -45,12 +45,8 @@ impl Stream for ReadyChunks { } // Push the ready item into the buffer and check whether it is full. - // If so, replace our buffer with a new and empty one and return - // the full one. + // If so, return it. Poll::Ready(Some(item)) => { - if items.is_empty() { - items.reserve(*this.cap); - } items.push(item); if items.len() >= *this.cap { return Poll::Ready(Some(items));