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
# rustfmt.toml
# Max width for line lengths
= 80
# Use 4 spaces for indentation
= 4
# Format code inside `impl` blocks consistently
= true
# Indentation style: "Block" or "Visual"
# "Block" means indent based on the current block structure (e.g., inside `{}`).
# "Visual" aligns items vertically across lines.
= "Block"
# Control whether or not to insert trailing commas in arrays and structs
= "Always" # Options: "Never", "Always", "Horizontal"
# Control whether to group items that are part of a larger expression or statement
= "StdExternalCrate"
# Max width of a comment before it gets wrapped
= 80
# Control how `if let` and `match` arms are formatted
= 80
# Control whether to add `use` statements in the same line
= "Max" # Possible values: "max", "always", "never"
# Whether or not to force the `else` block to be on the same line
= false
# Whether or not to use `unwrap()` on `Option` and `Result` values
# This is typically a preference for safety vs convenience.
= true
# Enable some experimental features (may change in future versions)
= "2018" # Set the Rust edition to use (2015 or 2018)
# Reformat functions, methods, and closures
= true # Ensures imports are ordered