From e1006a5be1d5d9d4fa6d77f43b14cbd65c5eeae4 Mon Sep 17 00:00:00 2001 From: wangcundashang Date: Wed, 19 Jun 2024 11:23:19 +0800 Subject: [PATCH] refactor: optimize code based on cargo clippy Signed-off-by: wangcundashang --- src/io/read/chain.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/io/read/chain.rs b/src/io/read/chain.rs index 4fcdb0ec..51ee1151 100644 --- a/src/io/read/chain.rs +++ b/src/io/read/chain.rs @@ -144,7 +144,7 @@ impl BufRead for Chain { let this = self.project(); if !*this.done_first { match futures_core::ready!(this.first.poll_fill_buf(cx)) { - Ok(buf) if buf.is_empty() => { + Ok([]) => { *this.done_first = true; } Ok(buf) => return Poll::Ready(Ok(buf)),