Skip to content

Commit

Permalink
Set up rustfmt (#2)
Browse files Browse the repository at this point in the history
* Add rustfmt toml

* Update rust ci

* Fix format job

* Fix missing component

* Add stable fmt
  • Loading branch information
quambene authored Aug 27, 2023
1 parent 848c9d5 commit 4632128
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/rust-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
- name: cargo fmt
run: cargo fmt
fmt-nightly:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- name: cargo +nightly fmt
run: cargo +nightly fmt
test:
runs-on: ubuntu-latest
steps:
Expand Down
4 changes: 4 additions & 0 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
unstable_features = true
imports_granularity = "Crate"
group_imports = "One"
format_code_in_doc_comments = true

0 comments on commit 4632128

Please sign in to comment.