style: add rustfmt.toml
This commit is contained in:
@@ -16,10 +16,8 @@ jobs:
|
|||||||
rustfmt:
|
rustfmt:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Rust
|
- uses: dtolnay/rust-toolchain@nightly
|
||||||
uses: dtolnay/rust-toolchain@master
|
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
|
||||||
components: rustfmt
|
components: rustfmt
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- run: cargo fmt --check --verbose
|
- 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