io: simplify check for empty slice (#6293)

This commit is contained in:
Daniel Sedlak
2024-01-18 10:59:22 +00:00
committed by GitHub
parent eab26a662c
commit f80bbec28f
+1 -1
View File
@@ -114,7 +114,7 @@ where
if !*me.done_first {
match ready!(me.first.poll_fill_buf(cx)?) {
buf if buf.is_empty() => {
[] => {
*me.done_first = true;
}
buf => return Poll::Ready(Ok(buf)),