forked from jl777/SuperNET
-
Notifications
You must be signed in to change notification settings - Fork 94
/
rustfmt.toml
49 lines (39 loc) · 2.07 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
# Enable unstable features on stable and beta channels (unstable features are available by default on nightly).
# https://github.com/rust-lang/rustfmt/blob/master/Configurations.md#unstable_features
unstable_features = true
# Put single-expression functions on a single line
# Note: Unstable
# https://github.com/rust-lang/rustfmt/blob/master/Configurations.md#fn_single_line
fn_single_line = true
# Force multiline closure and match arm bodies to be wrapped in a block
# https://github.com/rust-lang/rustfmt/blob/master/Configurations.md#force_multiline_blocks
force_multiline_blocks = false
# Indent style of imports
# Note: Unstable
# https://github.com/rust-lang/rustfmt/blob/master/Configurations.md#imports_indent
imports_indent = "Visual"
# Write an item and its attribute on the same line if their combined width is below a threshold
# Note: Unstable
# https://github.com/rust-lang/rustfmt/blob/master/Configurations.md#inline_attribute_width
inline_attribute_width = 65
# Put a trailing comma after a block based match arm (non-block arms are not affected)
# https://github.com/rust-lang/rustfmt/blob/master/Configurations.md#match_block_trailing_comma
match_block_trailing_comma = true
# Maximum width of each line.
# Default: 100
# https://github.com/rust-lang/rustfmt/blob/master/Configurations.md#max_width
max_width = 120
# Unix or Windows line endings
# https://github.com/rust-lang/rustfmt/blob/master/Configurations.md#newline_style
newline_style = "Auto"
# When structs, slices, arrays, and block/array-like macros are used as the last argument in an expression list,
# allow them to overflow (like blocks/closures) instead of being indented on a new line.
# Note: Unstable
# https://github.com/rust-lang/rustfmt/blob/master/Configurations.md#overflow_delimited_expr
overflow_delimited_expr = true
# Number of spaces per tab
# https://github.com/rust-lang/rustfmt/blob/master/Configurations.md#tab_spaces
tab_spaces = 4
# Use field initialize shorthand if possible.
# https://github.com/rust-lang/rustfmt/blob/master/Configurations.md#use_field_init_shorthand
use_field_init_shorthand = true