From 197d9582aa249055b6036d6e624569b3fb76eba7 Mon Sep 17 00:00:00 2001 From: Daniel Sedlak Date: Wed, 17 Jan 2024 18:45:35 +0100 Subject: [PATCH] util: simplify check for empty slice in chain --- 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)),