-
Notifications
You must be signed in to change notification settings - Fork 118
Expand file tree
/
Copy pathrustfmt.toml
More file actions
148 lines (104 loc) · 2.63 KB
/
Copy pathrustfmt.toml
File metadata and controls
148 lines (104 loc) · 2.63 KB
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# Rustfmt configuration for ACBU smart contract workspace
# This ensures consistent formatting across all developers
# Maximum line width
max_width = 100
# Hard tabs or spaces
hard_tabs = false
tab_spaces = 4
# Newline style
newline_style = "Unix"
# Use field init shorthand if possible
use_field_init_shorthand = true
# Use try shorthand
use_try_shorthand = true
# Force explicit types in public items
# public_item_fields = false # Disabled to allow inference where sensible
# Format comments
comment_width = 100
wrap_comments = true
normalize_comments = true
normalize_doc_attributes = true
# Imports
imports_granularity = "Crate"
group_imports = "StdExternalCrate"
reorder_imports = true
# Structs and enums
struct_field_align_threshold = 0
enum_discrim_align_threshold = 0
# Match expressions
match_arm_blocks = true
match_arm_leading_pipes = "Never"
# Chains
chain_width = 60
# Control flow
single_line_if_else_max_width = 50
# Arrays
array_width = 60
# Error messages
error_on_line_overflow = false
error_on_unformatted = false
# Edition
edition = "2021"
# Merge derives
merge_derives = true
# Remove nested parens
remove_nested_parens = true
# Reorder impl items
reorder_impl_items = true
# Skip children
# skip_children = false
# Space after colon
space_after_colon = true
space_before_colon = false
# Spaces around ranges
spaces_around_ranges = false
# Trailing comma
trailing_comma = "Vertical"
trailing_semicolon = true
# Type punctuation density
type_punctuation_density = "Wide"
# Blank lines
blank_lines_upper_bound = 1
blank_lines_lower_bound = 0
# Brace style
brace_style = "SameLineWhere"
# Control brace style
control_brace_style = "AlwaysSameLine"
# Empty item single line
empty_item_single_line = true
# Fn args layout
fn_args_layout = "Tall"
# Fn call width
fn_call_width = 80
# Fn single line
fn_single_line = false
# Where single line
where_single_line = false
# Indent style
indent_style = "Block"
# Format strings
format_strings = true
# Format macro matchers
format_macro_matchers = true
format_macro_bodies = true
# Hex literal case
hex_literal_case = "Lower"
# Overflow delimited expr
overflow_delimited_expr = true
# Preserve block start blank lines
preserve_block_start_blank_lines = false
# Preserve closure block formatting
preserve_closure_blockFormatting = false
# Reorder modules
reorder_modules = true
# Report fixme
report_fixme = "Always"
report_todo = "Always"
# Short array element width threshold
short_array_element_width_threshold = 10
# Struct lit single line
struct_lit_single_line = true
# Struct variant width
struct_variant_width = 35
# Condense wildcard suffixes
condense_wildcard_suffixes = true