-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrustfmt.toml
More file actions
68 lines (46 loc) · 1.55 KB
/
rustfmt.toml
File metadata and controls
68 lines (46 loc) · 1.55 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
# Rust formatting configuration
# See https://rust-lang.github.io/rustfmt/
# Use edition 2021 features
edition = "2021"
# Maximum width of each line
max_width = 100
# Maximum width of the args of a function call before falling back to vertical formatting
fn_call_width = 80
# Maximum width of an array before falling back to vertical formatting
array_width = 80
# Maximum width of a chain before falling back to vertical formatting
chain_width = 80
# Maximum width of the args of a function-like attributes before falling back to vertical formatting
attr_fn_like_width = 80
# Maximum width of a struct literal before falling back to vertical formatting
struct_lit_width = 80
# Maximum width in the body of a struct variant before falling back to vertical formatting
struct_variant_width = 80
# Use field init shorthand if possible
use_field_init_shorthand = true
# Use small heuristics for formatting
use_small_heuristics = "Default"
# Merge imports
imports_granularity = "Crate"
# Group imports
group_imports = "StdExternalCrate"
# Reorder imports
reorder_imports = true
# Reorder modules
reorder_modules = true
# Format code in doc comments
format_code_in_doc_comments = true
# Format strings
format_strings = true
# Normalize comments
normalize_comments = true
# Wrap comments at max_width
wrap_comments = true
# Use try shorthand
use_try_shorthand = true
# Where to put a binary operator when a binary expression goes multiline
binop_separator = "Front"
# Remove blank lines at the start or end of a block
blank_lines_upper_bound = 1
# Edition
edition = "2021"