Skip to content

Commit 2fa5ff2

Browse files
committed
Pin Rust toolchain versions in ci.yml
Pin dtolnay/rust-toolchain actions to specific stable and nightly versions to prevent sudden build failures due to toolchain updates. Also fixed the new warnings found by updating the toolchain.
1 parent 3ffdbec commit 2fa5ff2

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66

77
env:
88
CARGO_TERM_COLOR: always
9+
STABLE_TOOLCHAIN: 1.92.0
10+
NIGHTLY_TOOLCHAIN: nightly-2025-12-16
911

1012
jobs:
1113
build_and_test:
@@ -14,7 +16,9 @@ jobs:
1416
steps:
1517
- uses: actions/checkout@v4
1618
- name: Install Rust
17-
uses: dtolnay/rust-toolchain@stable
19+
uses: dtolnay/rust-toolchain@master
20+
with:
21+
toolchain: ${{ env.STABLE_TOOLCHAIN }}
1822
- name: Build
1923
run: cargo build --verbose
2024
- name: Test
@@ -26,7 +30,9 @@ jobs:
2630
steps:
2731
- uses: actions/checkout@v4
2832
- name: Install Rust
29-
uses: dtolnay/rust-toolchain@nightly
33+
uses: dtolnay/rust-toolchain@master
34+
with:
35+
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
3036
- name: Sanity check fuzzers
3137
run: |
3238
cargo install cargo-fuzz
@@ -40,19 +46,20 @@ jobs:
4046
runs-on: ubuntu-latest
4147
steps:
4248
- uses: actions/checkout@v4
43-
- uses: dtolnay/rust-toolchain@stable
49+
- uses: dtolnay/rust-toolchain@master
4450
with:
45-
toolchain: nightly
51+
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
4652
components: rustfmt
47-
- run: cargo +nightly fmt --all -- --check
53+
- run: cargo fmt --all -- --check
4854

4955
check-clippy:
5056
name: check (clippy)
5157
runs-on: ubuntu-latest
5258
steps:
5359
- uses: actions/checkout@v4
54-
- uses: dtolnay/rust-toolchain@stable
60+
- uses: dtolnay/rust-toolchain@master
5561
with:
62+
toolchain: ${{ env.STABLE_TOOLCHAIN }}
5663
components: clippy
5764
- run: cargo clippy --all-features --all-targets -- -D warnings
5865

@@ -61,7 +68,9 @@ jobs:
6168
runs-on: ubuntu-latest
6269
steps:
6370
- uses: actions/checkout@v4
64-
- uses: dtolnay/rust-toolchain@stable
71+
- uses: dtolnay/rust-toolchain@master
72+
with:
73+
toolchain: ${{ env.STABLE_TOOLCHAIN }}
6574
# NOTE: We need to run `cargo test --doc` separately from normal tests:
6675
# https://github.com/rust-lang/cargo/issues/6669
6776
- name: Run doctests
@@ -79,7 +88,9 @@ jobs:
7988
steps:
8089
- uses: actions/checkout@v4
8190
- name: Install Rust
82-
uses: dtolnay/rust-toolchain@stable
91+
uses: dtolnay/rust-toolchain@master
92+
with:
93+
toolchain: ${{ env.STABLE_TOOLCHAIN }}
8394
- name: Build and sanity test
8495
run: |
8596
cd dcsctp-cxx/

src/packet/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,6 @@ pub enum ChunkParseError {
151151

152152
#[cfg(test)]
153153
mod tests {
154-
use super::*;
155-
156154
#[test]
157155
fn read_big_endian() {
158156
let a = &[1, 2, 3, 4, 5, 6, 7, 8];

0 commit comments

Comments
 (0)