-
Notifications
You must be signed in to change notification settings - Fork 369
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert rustfmt CI run to use stable rustfmt
- Loading branch information
Showing
2 changed files
with
12 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,23 +7,21 @@ on: | |
- rustfmt.toml | ||
- '**/*.rs' | ||
workflow_dispatch: | ||
env: | ||
RUST_NIGHTLY_TOOLCHAIN: nightly-2023-01-13 | ||
jobs: | ||
check-formatting: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install nightly Rust | ||
uses: actions-rs/[email protected] | ||
with: | ||
toolchain: ${{ env.RUST_NIGHTLY_TOOLCHAIN }} | ||
toolchain: stable | ||
components: rustfmt | ||
default: true | ||
|
||
- name: Check formatting | ||
run: |- | ||
rustfmt --version | ||
cargo fmt -- --check --unstable-features | ||
cargo fmt -- --check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
edition = "2021" | ||
|
||
# Activation of features, almost objectively better ;) | ||
use_try_shorthand = true | ||
use_field_init_shorthand = true | ||
condense_wildcard_suffixes = true | ||
normalize_comments = true | ||
wrap_comments = true | ||
imports_granularity = "Crate" | ||
|
||
# Heavily subjective style choices | ||
# Nightly only. Will not run in CI, but please format with these locally | ||
wrap_comments = true | ||
normalize_comments = true | ||
comment_width = 100 | ||
|
||
condense_wildcard_suffixes = true | ||
|
||
imports_granularity = "Crate" |