-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.rustfmt.toml
33 lines (28 loc) · 904 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
# Uses unstable options. Run with `cargo +nightly fmt`.
max_width = 120
blank_lines_upper_bound = 2
fn_call_width = 80
chain_width = 80
inline_attribute_width = 40
overflow_delimited_expr = true
struct_lit_single_line = true
struct_lit_width = 32
single_line_if_else_max_width = 80
use_field_init_shorthand = true
match_block_trailing_comma = true
imports_layout = "HorizontalVertical"
imports_granularity = "Module"
group_imports = "StdExternalCrate"
reorder_imports = true
reorder_modules = true
trailing_comma = "Vertical"
newline_style = "Unix"
tab_spaces = 4
# It currently isn't possible to add `#[rustfmt::skip]` attributes to
# code in doc-comments. Will re-enable this when it becomes possible.
# For now, this gives me the most control.
#
# See:
# - https://github.com/rust-lang/rustfmt/issues/5623
# - https://github.com/rust-lang/rustfmt/issues/3348
# format_code_in_doc_comments = true