Skip to content

Commit 7bbbc25

Browse files
committed
Update rustfmt config
1 parent b7c27ff commit 7bbbc25

1 file changed

Lines changed: 23 additions & 6 deletions

File tree

.rustfmt.toml

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,70 @@
1+
# array_width - allow use_small_heuristics
2+
# attr_fn_like_width - allow use_small_heuristics
13
binop_separator = "Front"
24
blank_lines_lower_bound = 0
35
blank_lines_upper_bound = 1
46
brace_style = "SameLineWhere"
7+
# chain_width - allow use_small_heuristics
58
color = "Auto"
69
combine_control_expr = false
710
comment_width = 120
811
condense_wildcard_suffixes = true
912
control_brace_style = "ClosingNextLine"
1013
disable_all_formatting = false
14+
# edition - allow default read from Cargo.toml
1115
empty_item_single_line = true
1216
enum_discrim_align_threshold = 0
1317
error_on_line_overflow = true
1418
error_on_unformatted = true
15-
fn_args_layout = "Tall"
19+
# fn_args_layout = "Tall" - Deprecated, see fn_params_layout
20+
# fn_call_width - allow use_small_heuristics
21+
fn_params_layout = "Tall"
1622
fn_single_line = false
1723
force_explicit_abi = true
1824
force_multiline_blocks = true
1925
format_code_in_doc_comments = true
26+
doc_comment_code_block_width = 120
27+
format_generated_files = false
28+
format_macro_matchers = true
2029
format_macro_bodies = true
21-
format_macro_matchers = false
30+
skip_macro_invocations = []
2231
format_strings = true
2332
hard_tabs = true
33+
hex_literal_case = "Upper"
2434
hide_parse_errors = false
35+
ignore = []
2536
imports_indent = "Block"
2637
imports_layout = "HorizontalVertical"
27-
imports_granularity = "Crate"
2838
indent_style = "block"
2939
inline_attribute_width = 0
3040
match_arm_blocks = true
3141
match_arm_leading_pipes = "Never"
3242
match_block_trailing_comma = true
3343
max_width = 120
3444
merge_derives = true
45+
imports_granularity = "Crate"
46+
# merge_imports - deprecated
3547
newline_style = "Unix"
36-
normalize_comments = false
48+
normalize_comments = true
3749
normalize_doc_attributes = true
3850
overflow_delimited_expr = true
3951
remove_nested_parens = true
4052
reorder_impl_items = true
4153
reorder_imports = true
4254
group_imports = "StdExternalCrate"
4355
reorder_modules = true
44-
report_fixme = "Never"
45-
report_todo = "Never"
56+
# required_version - allow default
57+
short_array_element_width_threshold = 8
4658
skip_children = false
59+
# single_line_if_else_max_width - allow use_small_heuristics
60+
# single_line_let_else_max_width - allow use_small_heuristics
4761
space_after_colon = true
4862
space_before_colon = false
4963
spaces_around_ranges = false
5064
struct_field_align_threshold = 0
5165
struct_lit_single_line = true
66+
# struct_lit_width - allow use_small_heuristics
67+
# struct_variant_width - allow use_small_heuristics
5268
tab_spaces = 4
5369
trailing_comma = "Vertical"
5470
trailing_semicolon = true
@@ -57,5 +73,6 @@ unstable_features = true
5773
use_field_init_shorthand = true
5874
use_small_heuristics = "Default"
5975
use_try_shorthand = true
76+
version = "Two"
6077
where_single_line = true
6178
wrap_comments = true

0 commit comments

Comments
 (0)