-
Notifications
You must be signed in to change notification settings - Fork 1
/
.rustfmt.toml
45 lines (33 loc) · 1.39 KB
/
.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
36
37
38
39
40
41
42
43
44
45
edition = "2018" # rust
version = "Two" # formatting preset
max_width = 120 # line width
# Error if cannot get line into `max_width` boundaries.
error_on_line_overflow = true
# Error if cannot get comments/string literals into `max_width`.
error_on_unformatted = true
# Trail commas *on blocks* in match arms as well as single line expressions (default).
match_block_trailing_comma = true
# If they're separated, it's probably for good reason.
merge_derives = false
# Very non-intrusive.
imports_granularity = "Crate"
# Reformat all lines to LF (\n) in case they aren't for whatever reason.
newline_style = "Unix"
# Lets structs/arrays/blocks/macros etc. overflow when last argument in an expr list.
# For example: foo(bar, baz, &[
# OVERFLOWING,
# EXPRESSION,
# ])
overflow_delimited_expr = true
# Forces typedefs and consts to come before macros and methods in impl blocks.
reorder_impl_items = true
# Puts grouped (no extra newline, adjacent) imports in alphabetical order.
reorder_imports = true
# For break, continue, return...
trailing_semicolon = false
# Enables the usage of "unstable" features.
unstable_features = true
# Use different formatting for items/expr if they satisfy "small".
# A good example of this is needlessly breaking vec.iter().map(|x| y).collect() into 4 lines,
# or breaking up a function call with simple expressions but many arguments overall.
use_small_heuristics = "Max"