-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrustfmt.toml
More file actions
65 lines (54 loc) · 1.35 KB
/
rustfmt.toml
File metadata and controls
65 lines (54 loc) · 1.35 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
# Rustfmt Configuration - Strict Formatting
# https://rust-lang.github.io/rustfmt/
# Stable options
edition = "2021"
max_width = 100
hard_tabs = false
tab_spaces = 4
newline_style = "Unix"
use_small_heuristics = "Default"
# Import organization
imports_granularity = "Module"
group_imports = "StdExternalCrate"
reorder_imports = true
reorder_modules = true
# Formatting choices
fn_single_line = false
where_single_line = false
force_multiline_blocks = false
struct_lit_single_line = true
trailing_comma = "Vertical"
trailing_semicolon = true
use_field_init_shorthand = true
use_try_shorthand = true
# Comments and documentation
format_code_in_doc_comments = true
doc_comment_code_block_width = 80
wrap_comments = true
comment_width = 100
normalize_comments = true
normalize_doc_attributes = true
# Macros
format_macro_matchers = true
format_macro_bodies = true
# Strings
format_strings = true
# Match arms
match_arm_blocks = true
match_arm_leading_pipes = "Never"
match_block_trailing_comma = true
# Control flow
combine_control_expr = true
control_brace_style = "AlwaysSameLine"
brace_style = "SameLineWhere"
# Functions
fn_args_layout = "Tall"
fn_params_layout = "Tall"
# Error handling
error_on_line_overflow = false
error_on_unformatted = false
# Misc
remove_nested_parens = true
short_array_element_width_threshold = 10
skip_children = false
hide_parse_errors = false