Skip to content

Commit 8d32751

Browse files
committed
Fix GitHub actions to run latest available rustfmt.
It tried to use rustfmt from the latest nightly, but nightly doesn't always include rustfmt. By using rustup to install the default profile of nightly, it automatically looks for the latest nightly that includes rustfmt.
1 parent da5403a commit 8d32751

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,5 @@ jobs:
115115
timeout-minutes: 2
116116
steps:
117117
- uses: actions/checkout@v1
118-
- name: Set Rustup profile to minimal
119-
run: rustup set profile minimal
120-
- name: "Add a rustup override for rustfmt nightly"
121-
uses: actions-rs/toolchain@v1
122-
with:
123-
toolchain: nightly
124-
components: rustfmt
125-
override: true
126-
- run: rustup component add rustfmt
127-
- run: cargo fmt -- --check
118+
- run: rustup install nightly
119+
- run: cargo +nightly fmt -- --check

0 commit comments

Comments
 (0)