-
Notifications
You must be signed in to change notification settings - Fork 1
/
.rustfmt.toml
53 lines (36 loc) · 1.5 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
# Required for options that are unstable
unstable_features = true
# Separates control expression from their function calls
combine_control_expr = false
# Replaces consecutive underscore variables into a single .. within tuple patterns
condense_wildcard_suffixes = true
# Puts single-expression functions on a single line
fn_single_line = true
# Formats code snippets in doc comments
format_code_in_doc_comments = true
# Format metavariables in macro declarations
format_macro_matchers = true
# Reorganizes imports into three groups: std, external, and crate
group_imports = "StdExternalCrate"
# Force uppercase hex literals
hex_literal_case = "Upper"
# Merges imports from the same crate
imports_granularity = "Crate"
# Forces the style of items inside an imports block
imports_layout = "HorizontalVertical"
# Put a trailing comma after a block based match arm
match_block_trailing_comma = true
# Converts /* */ comments to // comments where possible
normalize_comments = true
# Converts #![doc = "..."] attributes to /// comments where possible
normalize_doc_attributes = true
# Reoders impl items. `type` and `const` are grouped together, then macros and functions
reorder_impl_items = true
# Ensures that imports (and extern crate statements) are sorted alphabetically
reorder_imports = true
# Use fields init shorthand when possible
use_field_init_shorthand = true
# Replaces try! macro with ? operator
use_try_shorthand = true
# Breaks comments to fit within the maximum line width (80 characters)
wrap_comments = true