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
# This is a configuration file for the `rustfmt` tool.
# Many `rustfmt` configuration options are still considered "unstable".
# You need to configure your editor to format using `cargo +nightly fmt` instead of `cargo fmt`.
# Overall style settings
= "2024"
= true
# Default `max_width` is 100 -- we increase that a bit.
= 120
# Use the `max_width` setting to automatically adjust several other parameters:
# fn_call_width
# attr_fn_like_width
# struct_lit_width
# struct_variant_width
# array_width
# chain_width
# single_line_if_else_max_width
# We go for the most compact formatting.
= "Max"
# Comments
= 120
= true
= true
= 120
# Try to align struct fields.
= 20
# Attempt to align enum discriminants.
= 40
# Reorder `impl` items: `type` and `const` first, then macros and methods.
= true
# Denser function layout
= "Compressed"
= true
= true
# Put the `else {` on the next line instead of `} else {`.
= "ClosingNextLine"
# Import nesting & style
= "Crate"
= "Vertical"
# Other formatting settings
= true
= true
= true