We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f5a8b1d commit 2311ceaCopy full SHA for 2311cea
1 file changed
tokio-postgres/src/cancel_query_raw.rs
@@ -1,9 +1,7 @@
1
use crate::config::SslMode;
2
use crate::tls::TlsConnect;
3
use crate::{connect_tls, Error};
4
-use futures::future;
5
use postgres_protocol::message::frontend;
6
-use std::pin::Pin;
7
use tokio::io::{AsyncRead, AsyncWrite, AsyncWriteExt};
8
9
pub async fn cancel_query_raw<S, T>(
@@ -24,9 +22,7 @@ where
24
22
25
23
stream.write_all(&buf).await.map_err(Error::io)?;
26
stream.flush().await.map_err(Error::io)?;
27
- future::poll_fn(|cx| Pin::new(&mut stream).poll_shutdown(cx))
28
- .await
29
- .map_err(Error::io)?;
+ stream.shutdown().await.map_err(Error::io)?;
30
31
Ok(())
32
}
0 commit comments