2
0
Fork 1
mirror of https://github.com/async-rs/async-std.git synced 2025-01-30 09:15:33 +00:00

refactor: optimize code based on cargo clippy

Signed-off-by: wangcundashang <wangcundashang@qq.com>
This commit is contained in:
wangcundashang 2024-06-19 11:23:19 +08:00
parent b7be2183d5
commit e1006a5be1

View file

@ -144,7 +144,7 @@ impl<T: BufRead, U: BufRead> BufRead for Chain<T, U> {
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)),