From c1b0d20d7d86eeeb9f35df1d49151985194216e3 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 6 Aug 2025 11:53:23 -0700 Subject: [PATCH 1/3] Update dependencies and bump MSRV to 1.70. Update windows-sys, mio, and hermit-abi dependencies to support the latest versions. Bump the MSRV to 1.70, to accomodate socket2 0.6. --- .github/workflows/main.yml | 16 ++++++++-------- Cargo.toml | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7c7e544..172bdf9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -50,16 +50,16 @@ jobs: - run: cargo check --workspace --release -vv --target=x86_64-apple-darwin - run: cargo check --workspace --release -vv --target=x86_64-apple-darwin --no-default-features - check-1_63: + check-1_70: name: Check runs-on: ${{ matrix.os }} strategy: matrix: - build: [1.63] + build: [1.70] include: - - build: 1.63 + - build: 1.70 os: ubuntu-latest - rust: 1.63 + rust: 1.70 env: # -D warnings is commented out in our install-rust action; re-add it here. @@ -104,16 +104,16 @@ jobs: - run: cargo check --workspace --release -vv - run: cargo check --workspace --release -vv --no-default-features - check-windows-1_63: + check-windows-1_70: name: Check Windows runs-on: ${{ matrix.os }} strategy: matrix: - build: [1.63] + build: [1.70] include: - - build: 1.63 + - build: 1.70 os: windows-latest - rust: 1.63 + rust: 1.70 env: # -D warnings is commented out in our install-rust action; re-add it here. diff --git a/Cargo.toml b/Cargo.toml index eaf4891..935b2c1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ categories = ["os", "rust-patterns"] edition = "2021" repository = "https://github.com/sunfishcode/io-lifetimes" include = ["src", "build.rs", "Cargo.toml", "COPYRIGHT", "LICENSE*", "/*.md"] -rust-version = "1.63" +rust-version = "1.70" [dependencies] # io-lifetimes only depends on libc/windows-sys for the ability to close @@ -27,16 +27,16 @@ tokio = { version = "1.6.0", features = ["io-std", "fs", "net", "process"], opti # Optionally depend on socket2 to implement traits for its types. socket2 = { version = "0.6.0", optional = true } # Optionally depend on mio to implement traits for its types. -mio = { version = "0.8.0", features = ["net", "os-ext"], optional = true } +mio = { version = "1.0.0", features = ["net", "os-ext"], optional = true } [target.'cfg(target_os = "hermit")'.dependencies] -hermit-abi = { version = ">=0.3, <=0.4", optional = true } +hermit-abi = { version = ">=0.3, <=0.5", optional = true } [target.'cfg(not(windows))'.dependencies] libc = { version = "0.2.96", optional = true } [target.'cfg(windows)'.dependencies.windows-sys] -version = ">=0.52, <=0.59" +version = ">=0.52, <=0.60" optional = true features = [ "Win32_Foundation", From 1f032eb6eb232d5c1c5983b9a352ab9d5191b25c Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 6 Aug 2025 12:03:18 -0700 Subject: [PATCH 2/3] Work around YAML syntax. --- .github/workflows/main.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 172bdf9..6fc1017 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -55,11 +55,11 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - build: [1.70] + build: [1.70.0] include: - - build: 1.70 + - build: 1.70.0 os: ubuntu-latest - rust: 1.70 + rust: 1.70.0 env: # -D warnings is commented out in our install-rust action; re-add it here. @@ -109,11 +109,11 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - build: [1.70] + build: [1.70.0] include: - - build: 1.70 + - build: 1.70.0 os: windows-latest - rust: 1.70 + rust: 1.70.0 env: # -D warnings is commented out in our install-rust action; re-add it here. From bd615b5501d0649c44ca5f07e3b4510c14d62730 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 6 Aug 2025 12:04:59 -0700 Subject: [PATCH 3/3] Fix a warning. --- src/portability.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/portability.rs b/src/portability.rs index 6f6183d..685afc2 100644 --- a/src/portability.rs +++ b/src/portability.rs @@ -226,7 +226,7 @@ impl AsSocketlike for T { #[cfg(windows)] pub trait AsSocketlike: AsSocket { /// Borrows the reference. - fn as_socketlike(&self) -> BorrowedSocketlike; + fn as_socketlike(&self) -> BorrowedSocketlike<'_>; /// Return a borrowing view of a resource which dereferences to a /// `&Target`.