Browse Source

Fix compatibility with Rust 1.70.0 (#7128)

This commit fixes a compatibility issue with Rust 1.70.0 on Windows
targets. Rust 1.71.0 stabilized `AsSocket for Arc<T>` which is used here
implicitly, so to compile successfully on 1.70.0, our current MSRV, a
slight code change is required.

Closes #7127
pull/7129/head
Alex Crichton 1 year ago
committed by GitHub
parent
commit
c642a56cee
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      crates/wasi/src/preview2/host/tcp.rs

2
crates/wasi/src/preview2/host/tcp.rs

@ -513,7 +513,7 @@ impl<T: WasiView> crate::preview2::host::tcp::tcp::HostTcpSocket for T {
| TcpState::ConnectReady => {}
TcpState::Listening | TcpState::Connecting | TcpState::Connected => {
match rustix::net::shutdown(&dropped.inner, rustix::net::Shutdown::ReadWrite) {
match rustix::net::shutdown(&*dropped.inner, rustix::net::Shutdown::ReadWrite) {
Ok(()) | Err(Errno::NOTCONN) => {}
Err(err) => Err(err).unwrap(),
}

Loading…
Cancel
Save