Skip to content

Commit f45f492

Browse files
Release v1.0.3 (#1843)
1 parent cbb53c7 commit f45f492

File tree

4 files changed

+23
-23
lines changed

4 files changed

+23
-23
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ jobs:
103103
with:
104104
components: clippy
105105
- name: Clippy
106-
run: cargo clippy --all-targets --all-features -- --allow clippy::mixed-attributes-style --allow clippy::unused-io-amount -D warnings
106+
run: cargo clippy --all-targets --all-features -- --allow clippy::mixed-attributes-style --allow clippy::unused-io-amount --allow clippy::needless-lifetimes -D warnings
107107
Docs:
108108
runs-on: ubuntu-latest
109109
timeout-minutes: 10
@@ -135,7 +135,8 @@ jobs:
135135
- aarch64-apple-darwin
136136
- aarch64-apple-ios
137137
- aarch64-apple-tvos
138-
- aarch64-apple-visionos
138+
# Can't build standard library.
139+
#- aarch64-apple-visionos
139140
- aarch64-apple-watchos
140141
- aarch64-linux-android
141142
- aarch64-unknown-freebsd
@@ -151,11 +152,12 @@ jobs:
151152
- arm64_32-apple-watchos
152153
- armv7-sony-vita-newlibeabihf
153154
- i686-unknown-linux-gnu
154-
- i686-unknown-hurd-gnu
155+
# TODO: reenable <https://github.com/tokio-rs/mio/issues/1844>.
156+
#- i686-unknown-hurd-gnu
155157
# - powerpc64-ibm-aix Enable CI runs once aix has full stdlib upstreamed
156158
- riscv32imc-esp-espidf
157159
- sparcv9-sun-solaris
158-
- wasm32-wasi
160+
- wasm32-wasip1
159161
- x86_64-apple-darwin
160162
- x86_64-apple-ios
161163
- x86_64-pc-nto-qnx710

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# 1.0.3
2+
3+
* Implement more I/O safety traits
4+
(https://github.com/tokio-rs/mio/pull/1831).
5+
* Remove hermit-abi dependency, now using libc
6+
(https://github.com/tokio-rs/mio/pull/1830).
7+
* Use `poll(2)` implementation on AIX, removing the need for using
8+
`mio_unsupported_force_poll_poll`
9+
(https://github.com/tokio-rs/mio/pull/1833).
10+
111
# 1.0.2
212

313
* Work around eventfd bug on illumos

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name = "mio"
55
# When releasing to crates.io:
66
# - Update CHANGELOG.md.
77
# - Create git tag
8-
version = "1.0.2"
8+
version = "1.0.3"
99
license = "MIT"
1010
authors = [
1111
"Carl Lerche <me@carllerche.com>",

tests/tcp.rs

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -205,12 +205,8 @@ fn read() {
205205
for event in &events {
206206
assert_eq!(event.token(), Token(1));
207207
let mut buf = [0; 1024];
208-
loop {
209-
if let Ok(amt) = data.socket.read(&mut buf) {
210-
data.amt += amt;
211-
} else {
212-
break;
213-
}
208+
while let Ok(amt) = data.socket.read(&mut buf) {
209+
data.amt += amt;
214210
if data.amt >= N {
215211
data.shutdown = true;
216212
break;
@@ -270,12 +266,8 @@ fn peek() {
270266
Err(err) => panic!("unexpected error: {}", err),
271267
}
272268

273-
loop {
274-
if let Ok(amt) = data.socket.read(&mut buf) {
275-
data.amt += amt;
276-
} else {
277-
break;
278-
}
269+
while let Ok(amt) = data.socket.read(&mut buf) {
270+
data.amt += amt;
279271
if data.amt >= N {
280272
data.shutdown = true;
281273
break;
@@ -329,12 +321,8 @@ fn write() {
329321
for event in &events {
330322
assert_eq!(event.token(), Token(1));
331323
let buf = [0; 1024];
332-
loop {
333-
if let Ok(amt) = data.socket.write(&buf) {
334-
data.amt += amt;
335-
} else {
336-
break;
337-
}
324+
while let Ok(amt) = data.socket.write(&buf) {
325+
data.amt += amt;
338326
if data.amt >= N {
339327
data.shutdown = true;
340328
break;

0 commit comments

Comments
 (0)