-
Notifications
You must be signed in to change notification settings - Fork 1
/
.rustfmt.toml
56 lines (39 loc) · 1.67 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
46
47
48
49
50
51
52
53
54
55
56
# A set of sane, extremely close to "standard rust" style options
# Mostly just utilizes some common convention that is not currently
# agressively formatted by rustfmt, because I agree with said
# convention.
# Each option is commented with what effect it actually has.
# Enable unstable features
unstable_features = true
# Max blank lines between any statement
blank_lines_upper_bound = 2
# puts expressions on seperate lines from function calls
combine_control_expr = false
# turns chains of _ wildcards into a single .. wildcard in tuples
condense_wildcard_suffixes = true
# Force multiline closure and match arm bodies to be wrapped in a block
force_multiline_blocks = true
# format code in doc comments
format_code_in_doc_comments = true
# format metavariable macro matching patterns
format_macro_matchers = true
# format string literals where neccesary
format_strings = true
# hex literals are forced uppercase
hex_literal_case = "Upper"
# horizontal imports when the line is shorter than 80, vertical otherwise
imports_layout = "HorizontalVertical"
# Enforces single import per module, with merged imports for the same module
imports_granularity = "Module"
# Enforce unix style line endings
newline_style = "Unix"
# normalize comments to single line style instead of multiline
normalize_comments = true
# Reorder impl items to put type and const definitions first
reorder_impl_items = true
# Group imports into three groups: (std, core, alloc), extern crates, (self, super, crate)
group_imports = "StdExternalCrate"
# use field init shorthand ({x} instead of {x: x}) when possible
use_field_init_shorthand = true
# wrap comments if they're longer than 80 characters
wrap_comments = true