Skip to content

Commit

Permalink
io: simplify check for empty slice (#6293)
Browse files Browse the repository at this point in the history
  • Loading branch information
wutchzone committed Jan 18, 2024
1 parent eab26a6 commit f80bbec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tokio/src/io/util/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
Expand Down

0 comments on commit f80bbec

Please sign in to comment.