diff --git a/src/cache/mod.rs b/src/cache/mod.rs index 5055d60..22e7f0d 100644 --- a/src/cache/mod.rs +++ b/src/cache/mod.rs @@ -188,11 +188,7 @@ impl Stream for MemStream { fn poll_next(mut self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll> { let mut new_bytes = Bytes::new(); std::mem::swap(&mut self.0, &mut new_bytes); - if new_bytes.is_empty() { - Poll::Ready(None) - } else { - Poll::Ready(Some(Ok(new_bytes))) - } + Poll::Ready(Some(Ok(new_bytes))) } }