Skip to content

Commit 52d1623

Browse files
committed
ci: use rustup toolchain install with --allow-downgrade for nightly rustfmt
rustup component add does not support --allow-downgrade; the flag is only available on rustup toolchain install. This picks the most recent nightly that ships rustfmt when the latest nightly lacks it.
1 parent 8ec2f5b commit 52d1623

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ jobs:
3131
contents: read
3232
steps:
3333
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # actions/checkout v6
34-
- uses: dtolnay/rust-toolchain@5b842231ba77f5c045dba54ac5560fed2db780e2 # dtolnay/rust-toolchain nightly
35-
- run: rustup component add rustfmt --toolchain nightly --allow-downgrade
34+
- run: rustup toolchain install nightly --component rustfmt --allow-downgrade
3635
- run: cargo +nightly fmt --all -- --check
3736

3837
clippy:

0 commit comments

Comments
 (0)