From 422ebc1666c782d5be583b3ad35193257fcddf8b Mon Sep 17 00:00:00 2001 From: Thomas de Zeeuw Date: Fri, 29 Nov 2024 16:13:46 +0100 Subject: [PATCH 1/7] Release v1.0.3 --- CHANGELOG.md | 10 ++++++++++ Cargo.toml | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e350c248..91a81a270 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +# 1.0.3 + +* Implement more I/O safety traits + (https://github.com/tokio-rs/mio/pull/1831). +* Remove hermit-abi dependency, now using libc + (https://github.com/tokio-rs/mio/pull/1830). +* Use `poll(2)` implementation on AIX, removing the need for using + `mio_unsupported_force_poll_poll` + (https://github.com/tokio-rs/mio/pull/1833). + # 1.0.2 * Work around eventfd bug on illumos diff --git a/Cargo.toml b/Cargo.toml index e2f924e84..d63c61d48 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ name = "mio" # When releasing to crates.io: # - Update CHANGELOG.md. # - Create git tag -version = "1.0.2" +version = "1.0.3" license = "MIT" authors = [ "Carl Lerche ", From f989766eddbd605fd4d2f0c862c771a227fa395d Mon Sep 17 00:00:00 2001 From: Thomas de Zeeuw Date: Fri, 29 Nov 2024 17:32:52 +0100 Subject: [PATCH 2/7] Use wasm-32-wasi preview 1 The old target is removed from newest rustc versions. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6d6eed82b..590bf07d0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -155,7 +155,7 @@ jobs: # - powerpc64-ibm-aix Enable CI runs once aix has full stdlib upstreamed - riscv32imc-esp-espidf - sparcv9-sun-solaris - - wasm32-wasi + - wasm32-wasi-p1 - x86_64-apple-darwin - x86_64-apple-ios - x86_64-pc-nto-qnx710 From fc2cc92ff4d56161b09f41b53c667e412cf740ea Mon Sep 17 00:00:00 2001 From: Thomas de Zeeuw Date: Fri, 29 Nov 2024 17:34:29 +0100 Subject: [PATCH 3/7] Disable Hurd CI Rust's standard library currently doesn't build. --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 590bf07d0..2a4988a84 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -151,7 +151,8 @@ jobs: - arm64_32-apple-watchos - armv7-sony-vita-newlibeabihf - i686-unknown-linux-gnu - - i686-unknown-hurd-gnu + # TODO: reenable . + #- i686-unknown-hurd-gnu # - powerpc64-ibm-aix Enable CI runs once aix has full stdlib upstreamed - riscv32imc-esp-espidf - sparcv9-sun-solaris From 237f9218f252740fa4646334e7dd56c91cda5449 Mon Sep 17 00:00:00 2001 From: Thomas de Zeeuw Date: Fri, 29 Nov 2024 17:35:20 +0100 Subject: [PATCH 4/7] Allow clippy::needless-lifetimes Lifetimes can serve as helpful documentation. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2a4988a84..1b44e7156 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -103,7 +103,7 @@ jobs: with: components: clippy - name: Clippy - run: cargo clippy --all-targets --all-features -- --allow clippy::mixed-attributes-style --allow clippy::unused-io-amount -D warnings + run: cargo clippy --all-targets --all-features -- --allow clippy::mixed-attributes-style --allow clippy::unused-io-amount --allow clippy::needless-lifetimes -D warnings Docs: runs-on: ubuntu-latest timeout-minutes: 10 From 16638f659f500ea1ee557a9f565648387ad419a1 Mon Sep 17 00:00:00 2001 From: Thomas de Zeeuw Date: Fri, 29 Nov 2024 17:45:44 +0100 Subject: [PATCH 5/7] Disable VisionOS CI Can't build standard lib. --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1b44e7156..3f9d87958 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -135,7 +135,8 @@ jobs: - aarch64-apple-darwin - aarch64-apple-ios - aarch64-apple-tvos - - aarch64-apple-visionos + # Can't build standard library. + #- aarch64-apple-visionos - aarch64-apple-watchos - aarch64-linux-android - aarch64-unknown-freebsd From b672f5f8d4cfff50b95e917fa5e6c88b4d2fabb9 Mon Sep 17 00:00:00 2001 From: Thomas de Zeeuw Date: Fri, 29 Nov 2024 17:45:57 +0100 Subject: [PATCH 6/7] Fix wasm32 CI --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3f9d87958..cc98f9b94 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -157,7 +157,7 @@ jobs: # - powerpc64-ibm-aix Enable CI runs once aix has full stdlib upstreamed - riscv32imc-esp-espidf - sparcv9-sun-solaris - - wasm32-wasi-p1 + - wasm32-wasip1 - x86_64-apple-darwin - x86_64-apple-ios - x86_64-pc-nto-qnx710 From 5c83398dd68c3540adfbcd56abdb07312ab0b375 Mon Sep 17 00:00:00 2001 From: Thomas de Zeeuw Date: Fri, 29 Nov 2024 17:48:12 +0100 Subject: [PATCH 7/7] Fix Clippy lint --- tests/tcp.rs | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/tests/tcp.rs b/tests/tcp.rs index 824a3b1d0..ca70938dc 100644 --- a/tests/tcp.rs +++ b/tests/tcp.rs @@ -205,12 +205,8 @@ fn read() { for event in &events { assert_eq!(event.token(), Token(1)); let mut buf = [0; 1024]; - loop { - if let Ok(amt) = data.socket.read(&mut buf) { - data.amt += amt; - } else { - break; - } + while let Ok(amt) = data.socket.read(&mut buf) { + data.amt += amt; if data.amt >= N { data.shutdown = true; break; @@ -270,12 +266,8 @@ fn peek() { Err(err) => panic!("unexpected error: {}", err), } - loop { - if let Ok(amt) = data.socket.read(&mut buf) { - data.amt += amt; - } else { - break; - } + while let Ok(amt) = data.socket.read(&mut buf) { + data.amt += amt; if data.amt >= N { data.shutdown = true; break; @@ -329,12 +321,8 @@ fn write() { for event in &events { assert_eq!(event.token(), Token(1)); let buf = [0; 1024]; - loop { - if let Ok(amt) = data.socket.write(&buf) { - data.amt += amt; - } else { - break; - } + while let Ok(amt) = data.socket.write(&buf) { + data.amt += amt; if data.amt >= N { data.shutdown = true; break;