Skip to content

Commit 275dd86

Browse files
fix duplicate poll_close error (#4)
1 parent 688bd8d commit 275dd86

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sqlx-core/src/net/socket.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ impl Socket {
5555
}
5656

5757
pub async fn shutdown(&mut self) -> io::Result<()> {
58-
#[cfg(feature = "_rt-async-std")]
58+
#[cfg(all(feature = "_rt-async-std", not(feature = "_rt-wasm-bindgen")))]
5959
{
6060
use std::net::Shutdown;
6161

@@ -153,7 +153,7 @@ impl AsyncWrite for Socket {
153153
}
154154
}
155155

156-
#[cfg(feature = "_rt-async-std")]
156+
#[cfg(all(feature = "_rt-async-std", not(feature = "_rt-wasm-bindgen")))]
157157
fn poll_close(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<()>> {
158158
match &mut *self {
159159
Socket::Tcp(s) => Pin::new(s).poll_close(cx),

0 commit comments

Comments
 (0)