-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrustfmt.toml
41 lines (41 loc) · 1.73 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
# https://rust-lang.github.io/rustfmt/
# https://gist.github.com/FasterSpeeding/546905052138e2454268cf0d1320d4c6
blank_lines_lower_bound = 0
blank_lines_upper_bound = 2
brace_style = "PreferSameLine"
condense_wildcard_suffixes = true
control_brace_style = "AlwaysSameLine"
edition = "2018"
enum_discrim_align_threshold = 80
# error_on_line_overflow = true
# error_on_unformatted = true
fn_args_layout = "Tall"
fn_single_line = false
format_code_in_doc_comments = true
format_strings = true
imports_granularity = "Module"
imports_indent = "Block"
imports_layout = "Mixed"
indent_style = "Block"
# license_template_path = "LICENSE" TODO: how does this work?
max_width = 120
merge_derives = true
newline_style = "Unix"
normalize_comments = true
normalize_doc_attributes = true
reorder_impl_items = true
reorder_imports = true
group_imports = "StdExternalCrate"
reorder_modules = true
space_after_colon = true
space_before_colon = false
spaces_around_ranges = false
struct_field_align_threshold = 80
struct_lit_single_line = true
tab_spaces = 2
hard_tabs = true
trailing_semicolon = true
type_punctuation_density = "Wide"
unstable_features = true
use_field_init_shorthand = true # As a note, this mixes the short-hand with normal
wrap_comments = true