This commit is contained in:
Nikolay Kim 2024-04-07 22:55:54 +05:00
parent ccafe7a8be
commit ac7f03fd1b

View file

@ -202,11 +202,11 @@ impl Future for WriteTask {
match this.state.with_buf(|buf| flush_io(&mut *io, buf, cx)) { match this.state.with_buf(|buf| flush_io(&mut *io, buf, cx)) {
Poll::Ready(Ok(())) => { Poll::Ready(Ok(())) => {
let io = this.io.clone(); let io = this.io.clone();
#[allow(clippy::await_holding_refcell_ref)]
let fut = Box::pin(async move { let fut = Box::pin(async move {
let fut =
io.0.borrow() io.0.borrow()
.shutdown(std::net::Shutdown::Write); .shutdown(std::net::Shutdown::Write)
fut.await .await;
}); });
*st = Shutdown::Close(fut); *st = Shutdown::Close(fut);
continue; continue;
@ -511,11 +511,11 @@ impl Future for UnixWriteTask {
match this.state.with_buf(|buf| flush_io(&mut *io, buf, cx)) { match this.state.with_buf(|buf| flush_io(&mut *io, buf, cx)) {
Poll::Ready(Ok(())) => { Poll::Ready(Ok(())) => {
let io = this.io.clone(); let io = this.io.clone();
#[allow(clippy::await_holding_refcell_ref)]
let fut = Box::pin(async move { let fut = Box::pin(async move {
let fut =
io.0.borrow() io.0.borrow()
.shutdown(std::net::Shutdown::Write); .shutdown(std::net::Shutdown::Write)
fut.await .await
}); });
*st = Shutdown::Close(fut); *st = Shutdown::Close(fut);
continue; continue;