-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rustfmt.toml
59 lines (42 loc) · 1.18 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
57
58
59
# Personal configuration for the `rustfmt` tool.
# Stable options as of v1.6.0
## Use the 2021 edition of Rust
edition = "2021"
## Use the unix style line endings
newline_style = "Auto"
## Ensure if/else and let/else blocks are always on new lines
single_line_if_else_max_width = 0
single_line_let_else_max_width = 0
## Use field-init shorthand
use_field_init_shorthand = true
## Use the `?` instead of `try!`
use_try_shorthand = true
# Unstable options as of v1.6.0
## Enforce colored output
color = "Always"
## Configure comments
wrap_comments = true
comment_width = 120
normalize_comments = true
## Allow aligning of Enum Variants
enum_discrim_align_threshold = 20
## Format code in Doc Comments
doc_comment_code_block_width = 80
format_code_in_doc_comments = true
## Enforce string length limits
format_strings = true
## Imports Formatting
imports_indent = "Block"
imports_layout = "Vertical"
imports_granularity = "Crate"
reorder_imports = true
group_imports = "StdExternalCrate"
## Styling
indent_style = "Block"
## Impl styles
reorder_impl_items = true
## Module reordering
reorder_modules = true
## Struct formating
struct_field_align_threshold = 20
struct_lit_single_line = true