Skip to content

Commit 04dc468

Browse files
committed
style: add rustfmt.toml
1 parent 3e36ac9 commit 04dc468

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.github/workflows/rust.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
rustfmt:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: dtolnay/rust-toolchain@stable
12+
- uses: dtolnay/rust-toolchain@nightly
1313
with:
1414
components: rustfmt
1515
- uses: actions/checkout@v4

rustfmt.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# https://github.com/rust-lang/rustfmt/blob/master/Configurations.md
2+
format_code_in_doc_comments=true
3+
format_macro_matchers=true
4+
group_imports="StdExternalCrate"
5+
imports_granularity="Module"
6+
normalize_doc_attributes=true
7+
reorder_impl_items=true
8+
use_field_init_shorthand=true

0 commit comments

Comments
 (0)