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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# -------- https://rust-coding-guidelines.github.io/rust-coding-guidelines-zh/ --------
# -------- https://rust-lang.github.io/rustfmt/?search={key} --------
# Run rustfmt with this config (it should be picked up automatically).
= "2024"
= true
# Prevent carriage returns
= "Unix"
# Maximum line width of 120 characters
= 120
# Fine-grained width values are calculated as a proportion of `max_width`.
= "Default"
# (default) P.FMT.02 Indent with 4 spaces
= 4
# (default) P.FMT.02 Disallow the use of hard tabs for indentation
= false
# (default) P.FMT.03 Minimum blank lines between code lines: 0
= 0
# (default) P.FMT.03 Maximum blank lines between code lines: 1
= 1
# (default) P.FMT.04 Use the same line brace style for most language constructs (functions, structs, etc.)
= "SameLineWhere"
# (default) P.FMT.04 Place the opening brace of `where` clauses on the next line
= false
# (default) P.FMT.04 Use the same line brace style for control structures (e.g. `if`, `match`)
= "AlwaysSameLine"
# (default) P.FMT.05 Use block indentation style for multiple identifier definitions
= "Block"
# (default) P.FMT.06 Place operators at the start of new lines for multi-line expressions
= "Front"
# (default) P.FMT.07 Do not align discriminants of enum variants
= 0
# (default) P.FMT.07 Do not align struct fields
= 0
# (default) P.FMT.08 For up to five function parameters, place them on a single line; use block style for more
= "Tall"
# (default) P.FMT.08 Place import statements on new lines if more than four per line
= "Mixed"
# (default) P.FMT.09 Do not add spaces before colons
= false
# (default) P.FMT.09 Add spaces after colons
= true
# (default) P.FMT.09 Do not add spaces around range operators (`..`, `..=`)
= false
# (default) P.FMT.09 Add spaces around `+` and `=` operators (in type annotations)
= "Wide"
# (default) P.FMT.10 Use block style when match arms are too long to fit on the same line as `=>`
= true
# (default) P.FMT.10 Do not prepend match arms with extra leading pipes (`|`)
= "Never"
# P.FMT.11 Put imports from the same module within the same group
= "Crate"
# P.FMT.11 Group module imports as follows:
# * Imports from `std`, `core`, and `alloc` come first.
# * Imports from third-party crates come next.
# * Imports from local crates (with `self`, `super`, and `crate` prefixes) come last.
= "StdExternalCrate"
# (default) P.FMT.11 Order imports within groups in lexicographical order
= true
# P.FMT.12 Use compact format for macro matchers (left-hand side of `=>`) in macro definitions
= true
# (default) P.FMT.12 Use relaxed format for macro bodies (right-hand side of `=>`) in macro definitions
= true
# (default) P.FMT.13 Do not use field initialization shorthand
= false
# (default) P.FMT.14 Always explicitly specify the ABI for external functions
= true
# P.FMT.15 Allow the use of `..` to denote remaining elements when destructuring tuples
= true
# P.FMT.16 Do not merge unrelated traits into a single line in derive macros
= false
# Replace `try!` macro with the `?` operator
= true
# (default) P.CMT.02 Set the maximum width for a single-line comment to 80 characters
= 80
# P.CMT.02 Automatically wrap multi-line comments at the maximum width
= true
# P.CMT.03 Convert block comments (`/* */`) to line comments (`//`) where possible
= true
# (default) P.CMT.03 Convert `#![doc]` and `#[doc]` attributes to `//!` and `///` respectively
= false
# By default, ignore everything in the repository
# Tidy only checks files which are not ignored; each entry follows gitignore style
= []