Skip to content

Commit

Permalink
Fix compatibility with Rust 1.70.0 (#7128)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
alexcrichton authored Oct 2, 2023
1 parent f15869b commit c642a56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/wasi/src/preview2/host/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
}
Expand Down

0 comments on commit c642a56

Please sign in to comment.