Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump MSRV to v1.74 #1733

Merged
merged 5 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 4 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,22 +75,15 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "windows-latest"]
# TODO: once we update our MSRV above 1.53 add macOS again. Currently
# macOS, specifically Xcode 14, broke support for rustc < 1.53. See
# https://github.com/rust-lang/rust/issues/105167.
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
# NOTE: When updating also update Clippy flags, some are disabled due to
# MSRV.
toolchain: 1.46.0
toolchain: 1.74.0
- name: Check
# We only run check allowing us to use newer features in tests.
# We enable all features except for the `log` feature as since log v0.4.19
# it requires a MSRV later then rustc 1.46.
run: cargo check --no-default-features --features os-poll,os-ext,net
run: cargo check --all-features
Nightly:
runs-on: ubuntu-latest
timeout-minutes: 10
Expand All @@ -108,8 +101,7 @@ jobs:
with:
components: clippy
- name: Clippy
# NOTE: `clippy::uninlined-format-args` is enabled due to MSRV.
run: cargo clippy --all-targets --all-features -- -D warnings -A clippy::cognitive-complexity -A clippy::uninlined-format-args
run: cargo clippy --all-targets --all-features -- -D warnings
Docs:
runs-on: ubuntu-latest
timeout-minutes: 10
Expand Down Expand Up @@ -137,8 +129,6 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Install all targets
run: make install_targets
- name: Install Cargo-hack
Expand Down
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[package]
edition = "2018"
edition = "2021"
rust-version = "1.74"
name = "mio"
# When releasing to crates.io:
# - Update CHANGELOG.md.
Expand Down
4 changes: 2 additions & 2 deletions tests/poll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ fn poll_registration() {
let interests = Interest::READABLE;
registry.register(&mut source, token, interests).unwrap();
assert_eq!(source.registrations.len(), 1);
assert_eq!(source.registrations.get(0), Some(&(token, interests)));
assert_eq!(source.registrations.first(), Some(&(token, interests)));
assert!(source.reregistrations.is_empty());
assert_eq!(source.deregister_count, 0);

Expand All @@ -593,7 +593,7 @@ fn poll_registration() {
assert_eq!(source.registrations.len(), 1);
assert_eq!(source.reregistrations.len(), 1);
assert_eq!(
source.reregistrations.get(0),
source.reregistrations.first(),
Some(&(re_token, re_interests))
);
assert_eq!(source.deregister_count, 0);
Expand Down