-
Notifications
You must be signed in to change notification settings - Fork 1
/
rustfmt.toml
41 lines (34 loc) · 1.11 KB
/
rustfmt.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
version = "Two"
unstable_features = true
edition = "2021"
indent_style = "Block"
newline_style = "Unix"
use_field_init_shorthand = true
use_try_shorthand = true
# ==== comments & docs
# Maximum length of comments. Default value: 80
comment_width = 80
normalize_comments = true
normalize_doc_attributes = true
# Break comments to fit on the line
# https://rust-lang.github.io/rustfmt/?version=v1.6.0&search=#wrap_comments
wrap_comments = true
# ==== Abount format
# https://rust-lang.github.io/rustfmt/?version=v1.6.0&search=#condense_wildcard_suffixes
format_code_in_doc_comments = true
format_macro_bodies = true
format_macro_matchers = true
# https://rust-lang.github.io/rustfmt/?version=v1.6.0&search=#format_strings
format_strings = true
# Put single-expression functions on a single line
# https://rust-lang.github.io/rustfmt/?version=v1.6.0&search=#fn_single_line
fn_single_line = true
condense_wildcard_suffixes = true
# ==== Import
imports_granularity = "Crate"
group_imports = "StdExternalCrate"
# ==== Reorder
reorder_impl_items = true
reorder_imports = true
reorder_modules = true
struct_field_align_threshold = 20