Skip to content

Commit 268184a

Browse files
authored
Update to Rust 1.85 and Rust 2024 Edition (#155)
This was a pretty easy transition, `cargo fix` and `cargo fmt` did almost everything. I updated to `rand` 0.9 which deprecates the `gen*` methods now that `gen` is a reserved keyword, and there was one place where I had to add a `use<>` impl trait bound.
1 parent 5648f74 commit 268184a

24 files changed

Lines changed: 296 additions & 475 deletions

.github/workflows/ci.yml

Lines changed: 9 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
continue-on-error: true
1515
steps:
1616
- uses: actions/checkout@v4
17-
- uses: EmbarkStudios/cargo-deny-action@v1
17+
- uses: EmbarkStudios/cargo-deny-action@v2
1818
with:
1919
arguments: --all-features
2020
command: check advisories
@@ -25,48 +25,22 @@ jobs:
2525
steps:
2626
- uses: actions/checkout@v4
2727
- name: Install Rust toolchain
28-
uses: dtolnay/rust-toolchain@master
29-
with:
30-
# The latest version of nightly leads to failre on CI check:
31-
# error[E0635]: unknown feature `proc_macro_span_shrink`
32-
# --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.58/src/lib.rs:92:30
33-
# |
34-
# 92 | feature(proc_macro_span, proc_macro_span_shrink)
35-
# | ^^^^^^^^^^^^^^^^^^^^^^
36-
#
37-
# to prevent this we pinned the specific version of nightly with doesn't have this bug, you can unpin the version
38-
# if you check that this works
39-
#
40-
# More details see here: https://github.com/dtolnay/proc-macro2/issues/356#issuecomment-1614449061
41-
# and here https://github.com/dtolnay/proc-macro2/issues/356#issuecomment-1614467505
42-
#
43-
toolchain: nightly-2023-06-15
28+
uses: dtolnay/rust-toolchain@stable
4429
- uses: Swatinem/rust-cache@v2
45-
- uses: EmbarkStudios/cargo-deny-action@v1
30+
- uses: EmbarkStudios/cargo-deny-action@v2
4631
with:
4732
arguments: --all-features
4833
command: check bans licenses sources
49-
- name: Install cargo-udeps
50-
shell: bash
51-
run: |
52-
wget \
53-
--output-file cargo-udeps.tar.gz \
54-
--tries=10 --retry-connrefused \
55-
https://github.com/est31/cargo-udeps/releases/download/v0.1.35/cargo-udeps-v0.1.35-x86_64-unknown-linux-gnu.tar.gz
56-
tar xvzf cargo-udeps-v0.1.35-x86_64-unknown-linux-gnu.tar.gz --strip-components=2
57-
mv cargo-udeps $HOME/.cargo/bin/
5834
- name: Check for unused dependencies
59-
shell: bash
60-
run: |
61-
cargo +nightly-2023-06-15 udeps
35+
uses: bnjbvr/cargo-machete@v0.8.0
6236

6337
rustfmt:
6438
runs-on: ubuntu-latest
6539
steps:
6640
- name: Checkout repository
6741
uses: actions/checkout@v4
6842
- name: Install Rust toolchain
69-
uses: dtolnay/rust-toolchain@1.81.0
43+
uses: dtolnay/rust-toolchain@1.85.0
7044
with:
7145
components: rustfmt
7246
- uses: Swatinem/rust-cache@v2
@@ -83,7 +57,7 @@ jobs:
8357
- name: Checkout repository
8458
uses: actions/checkout@v4
8559
- name: Install Rust toolchain
86-
uses: dtolnay/rust-toolchain@1.81.0
60+
uses: dtolnay/rust-toolchain@1.85.0
8761
with:
8862
components: clippy
8963
- uses: Swatinem/rust-cache@v2
@@ -110,7 +84,7 @@ jobs:
11084
- name: Checkout repository
11185
uses: actions/checkout@v4
11286
- name: Install Rust toolchain
113-
uses: dtolnay/rust-toolchain@1.81.0
87+
uses: dtolnay/rust-toolchain@1.85.0
11488
- uses: Swatinem/rust-cache@v2
11589
- name: Cache the minio binary
11690
id: cache-minio
@@ -175,7 +149,7 @@ jobs:
175149
- name: Checkout repository
176150
uses: actions/checkout@v4
177151
- name: Install Rust toolchain
178-
uses: dtolnay/rust-toolchain@1.81.0
152+
uses: dtolnay/rust-toolchain@1.85.0
179153
with:
180154
targets: x86_64-unknown-linux-musl
181155
- name: Install MUSL deps
@@ -200,7 +174,7 @@ jobs:
200174
- name: Checkout repository
201175
uses: actions/checkout@v4
202176
- name: Install Rust toolchain
203-
uses: dtolnay/rust-toolchain@1.81.0
177+
uses: dtolnay/rust-toolchain@1.85.0
204178
- uses: Swatinem/rust-cache@v2
205179
- name: Check documentation
206180
env:

.github/workflows/publish-crates.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Checkout repository
1919
uses: actions/checkout@v4
2020
- name: Install Rust toolchain
21-
uses: dtolnay/rust-toolchain@1.81.0
21+
uses: dtolnay/rust-toolchain@1.85.0
2222
- uses: Swatinem/rust-cache@v2
2323
- name: Publish ssstar-testing
2424
uses: actions-rs/cargo@v1

.github/workflows/publish-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
- name: Checkout repository
4545
uses: actions/checkout@v4
4646
- name: Install Rust toolchain
47-
uses: dtolnay/rust-toolchain@1.81.0
47+
uses: dtolnay/rust-toolchain@1.85.0
4848
with:
4949
targets: ${{ matrix.job.target }}
5050
- uses: Swatinem/rust-cache@v2

Cargo.lock

Lines changed: 72 additions & 53 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)