Skip to content

Commit 6967eb2

Browse files
committed
Format config
1 parent f185b63 commit 6967eb2

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

rustfmt.toml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Merge similar crates together to avoid multiple use statements.
2+
imports_granularity = "Module"
3+
4+
# Consistency in formatting makes tool based searching/editing better.
5+
empty_item_single_line = false
6+
7+
# Easier editing when arbitrary mixed use statements do not collapse.
8+
imports_layout = "Vertical"
9+
10+
# Default rustfmt formatting of match arms with branches is awful.
11+
match_arm_leading_pipes = "Preserve"
12+
13+
# Align Fields
14+
enum_discrim_align_threshold = 80
15+
struct_field_align_threshold = 80
16+
17+
# Allow up to two blank lines for grouping.
18+
blank_lines_upper_bound = 2
19+
20+
# Wrap comments
21+
comment_width = 120
22+
wrap_comments = true

0 commit comments

Comments
 (0)