Skip to content

Commit

Permalink
style: add rustfmt.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
EdJoPaTo committed Oct 24, 2024
1 parent b913dcd commit e669406
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ jobs:
rustfmt:
runs-on: ubuntu-latest
steps:
- name: Setup Rust
uses: dtolnay/rust-toolchain@master
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: stable
components: rustfmt
- uses: actions/checkout@v4
- run: cargo fmt --check --verbose
Expand Down
8 changes: 8 additions & 0 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# https://github.com/rust-lang/rustfmt/blob/master/Configurations.md
format_code_in_doc_comments = true
format_macro_matchers = true
group_imports = "StdExternalCrate"
imports_granularity = "Module"
normalize_doc_attributes = true
reorder_impl_items = true
use_field_init_shorthand = true

0 comments on commit e669406

Please sign in to comment.