From bafbcee725c554c0d0585d34d250aec2a26f41bb Mon Sep 17 00:00:00 2001 From: Thomas de Zeeuw Date: Fri, 14 Jun 2024 11:29:33 +0200 Subject: [PATCH] Update to Mio v1 Bumps the MSRV to 1.70. 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 555e94d2edd..f3206ebaa47 100644 --- a/tokio/Cargo.toml +++ b/tokio/Cargo.toml @@ -95,7 +95,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 } num_cpus = { version = "1.8.0", optional = true } parking_lot = { version = "0.12.0", optional = true } 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.