Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 4025c87

Browse files
author
Joe C
authored
rustfmt: use nightly in CI
This PR opts for using the `nightly` channel in CI for `rustfmt`.
1 parent 713a14f commit 4025c87

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

.github/workflows/pull-request.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ jobs:
2828
- name: Set env vars
2929
run: |
3030
source ci/rust-version.sh
31-
echo "RUST_STABLE=$rust_stable" >> $GITHUB_ENV
31+
echo "RUST_NIGHTLY=$rust_nightly" >> $GITHUB_ENV
3232
3333
- uses: actions-rs/toolchain@v1
3434
with:
35-
toolchain: ${{ env.RUST_STABLE }}
35+
toolchain: ${{ env.RUST_NIGHTLY }}
3636
override: true
3737
profile: minimal
3838
components: rustfmt

cargo-nightly.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
3+
here=$(dirname "$0")
4+
source "${here}"/ci/rust-version.sh nightly
5+
# shellcheck disable=SC2054 # rust_nightly is sourced from rust-version.sh
6+
toolchain="$rust_nightly"
7+
set -x
8+
exec cargo "+${toolchain}" "${@}"

rustfmt.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
edition = "2021"

0 commit comments

Comments
 (0)