From f80bbec28ff790d15481a29583c9b778bf0cc40e Mon Sep 17 00:00:00 2001 From: Daniel Sedlak Date: Thu, 18 Jan 2024 11:59:22 +0100 Subject: [PATCH] io: simplify check for empty slice (#6293) --- tokio/src/io/util/chain.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tokio/src/io/util/chain.rs b/tokio/src/io/util/chain.rs index 84f37fc7d46..f96f42f4a99 100644 --- a/tokio/src/io/util/chain.rs +++ b/tokio/src/io/util/chain.rs @@ -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)),