From e8f9894eee2da83493c0b8ecccbf9db3e18a6d54 Mon Sep 17 00:00:00 2001 From: Thomas de Zeeuw Date: Fri, 14 Jun 2024 11:29:33 +0200 Subject: [PATCH 1/2] Update to Mio v1 One breaking changes is the removal of mio::net::SocketAddr, replacing it with std::os::unix::net::SocketAddr. The methods on the type should be the same. For some smaller OS, such as ESP-IDF and Hermit, it can now be compiled without RUSTFLAGS. --- tokio/Cargo.toml | 2 +- tokio/src/net/unix/socketaddr.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tokio/Cargo.toml b/tokio/Cargo.toml index 4101d250df1..9efba08c6c7 100644 --- a/tokio/Cargo.toml +++ b/tokio/Cargo.toml @@ -92,7 +92,7 @@ pin-project-lite = "0.2.11" # Everything else is optional... bytes = { version = "1.0.0", optional = true } -mio = { version = "0.8.9", optional = true, default-features = false } +mio = { version = "1.0.0", optional = true, default-features = false } parking_lot = { version = "0.12.0", optional = true } [target.'cfg(not(target_family = "wasm"))'.dependencies] diff --git a/tokio/src/net/unix/socketaddr.rs b/tokio/src/net/unix/socketaddr.rs index 48f7b96b8c2..62ed4294d45 100644 --- a/tokio/src/net/unix/socketaddr.rs +++ b/tokio/src/net/unix/socketaddr.rs @@ -2,7 +2,7 @@ use std::fmt; use std::path::Path; /// An address associated with a Tokio Unix socket. -pub struct SocketAddr(pub(super) mio::net::SocketAddr); +pub struct SocketAddr(pub(super) std::os::unix::net::SocketAddr); impl SocketAddr { /// Returns `true` if the address is unnamed. From c46e19eaf13a8b9caf9b98ef51275529f1384de3 Mon Sep 17 00:00:00 2001 From: Thomas de Zeeuw Date: Tue, 23 Jul 2024 13:27:59 +0200 Subject: [PATCH 2/2] Update to Mio v1.0.1 Fixes an issue with null byte being included in UDS addresses. --- tokio/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tokio/Cargo.toml b/tokio/Cargo.toml index 9efba08c6c7..de566d02efc 100644 --- a/tokio/Cargo.toml +++ b/tokio/Cargo.toml @@ -92,7 +92,7 @@ pin-project-lite = "0.2.11" # Everything else is optional... bytes = { version = "1.0.0", optional = true } -mio = { version = "1.0.0", optional = true, default-features = false } +mio = { version = "1.0.1", optional = true, default-features = false } parking_lot = { version = "0.12.0", optional = true } [target.'cfg(not(target_family = "wasm"))'.dependencies]