style: add rustfmt.toml
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user