-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrustfmt.toml
More file actions
76 lines (64 loc) · 2.14 KB
/
rustfmt.toml
File metadata and controls
76 lines (64 loc) · 2.14 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
# ==========================================
# Rustfmt Configuration
# ==========================================
# ------------------------------------------
# Edition & Core
# ------------------------------------------
edition = "2024"
tab_spaces = 4
max_width = 100
# ------------------------------------------
# Alignment & Spacing
# ------------------------------------------
struct_field_align_threshold = 50
enum_discrim_align_threshold = 20
space_after_colon = true
space_before_colon = false
spaces_around_ranges = true
# ------------------------------------------
# Braces, Blocks & Control Flow
# ------------------------------------------
control_brace_style = "ClosingNextLine"
combine_control_expr = false
force_multiline_blocks = true
fn_single_line = true
fn_args_layout = "Tall"
single_line_if_else_max_width = 0
# ------------------------------------------
# Match Formatting
# ------------------------------------------
match_arm_leading_pipes = "Never"
match_block_trailing_comma = true
# ------------------------------------------
# Imports
# ------------------------------------------
reorder_imports = true
imports_layout = "HorizontalVertical"
imports_granularity = "Crate"
group_imports = "StdExternalCrate"
# ------------------------------------------
# Structs & Literals
# ------------------------------------------
struct_lit_single_line = false
use_field_init_shorthand = true
# ------------------------------------------
# Comments & Docs
# ------------------------------------------
comment_width = 100
wrap_comments = true
normalize_comments = true
format_code_in_doc_comments = true
# ------------------------------------------
# Macros & Strings
# ------------------------------------------
format_macro_matchers = true
format_string = true
# ------------------------------------------
# Item Ordering
# ------------------------------------------
reorder_impl_items = true
# ------------------------------------------
# Trailing Style
# ------------------------------------------
trailing_comma = "Never"
trailing_semicolon = true