Repository navigation
Expand file tree
/
Copy pathrustfmt.toml
More file actions
115 lines (81 loc) · 2.05 KB
/
Copy pathrustfmt.toml
File metadata and controls
115 lines (81 loc) · 2.05 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
# Rustfmt configuration for ACBU smart contract workspace
# Restricted to stable options only — compatible with `cargo +stable fmt --check`
# 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
# 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
# Space after colon
space_after_colon = true
space_before_colon = false
# Spaces around ranges
spaces_around_ranges = false
# Trailing comma — "Vertical" is stable
trailing_comma = "Vertical"
trailing_semicolon = true
# Type punctuation density
type_punctuation_density = "Wide"
# Brace style
brace_style = "SameLineWhere"
# Control brace style
control_brace_style = "AlwaysSameLine"
# Empty item single line
empty_item_single_line = true
# fn_params_layout replaces the deprecated fn_args_layout
fn_params_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"
# Hex literal case
hex_literal_case = "Lower"
# Reorder modules
reorder_modules = true
# 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