-
Notifications
You must be signed in to change notification settings - Fork 12
/
rustfmt.toml
35 lines (34 loc) · 956 Bytes
/
rustfmt.toml
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
# https://github.com/rust-lang-nursery/rustfmt/blob/master/src/config.rs
# Stable
unstable_features = true
edition = "2021"
max_width = 900
tab_spaces = 2
match_block_trailing_comma = true
use_try_shorthand = true
binop_separator = "Front"
use_small_heuristics = "Max"
fn_params_layout = "Compressed"
newline_style = "Unix"
use_field_init_shorthand = true
match_arm_leading_pipes = "Never"
# Nightly
force_multiline_blocks = true
indent_style = "Visual"
imports_indent = "Block"
imports_granularity = "Crate"
wrap_comments = false
normalize_comments = false
format_code_in_doc_comments = true
reorder_impl_items = true
fn_single_line = true
where_single_line = true
brace_style = "PreferSameLine"
trailing_comma = "Vertical"
trailing_semicolon = true
type_punctuation_density = "Compressed"
overflow_delimited_expr = true
condense_wildcard_suffixes = true
enum_discrim_align_threshold = 20
struct_field_align_threshold = 20
struct_lit_single_line = false