async_db: refactor WriterSink::poll_ready
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Dmitry Belyaev 2023-08-14 17:11:53 +03:00
parent 3ea4930105
commit f1d4cf05c5
Signed by: b4tman
GPG Key ID: 41A00BF15EA7E5F3
1 changed files with 3 additions and 13 deletions

View File

@ -173,19 +173,9 @@ where
let item = this.item.take().unwrap();
let fut = this.writer.push(item);
pin_mut!(fut);
match fut.poll(ctx) {
Poll::Ready(Ok(_)) => {
*this.item = None;
Poll::Ready(Ok(()))
}
Poll::Ready(Err(e)) => {
*this.item = None;
Poll::Ready(Err(e))
}
Poll::Pending => Poll::Pending,
}
let push_fut = this.writer.push(item);
pin_mut!(push_fut);
push_fut.poll(ctx)
}
fn start_send(self: std::pin::Pin<&mut Self>, item: T) -> Result<(), Self::Error> {