-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathrustfmt.toml
More file actions
73 lines (49 loc) · 1.72 KB
/
rustfmt.toml
File metadata and controls
73 lines (49 loc) · 1.72 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Rust fmt config for PolyEngien project.
# File ignore list
ignore = []
# Enable unstable features
unstable_features = true
# Use 2018 rust edition
edition = "2018"
# Put single-expression functions on a single line
fn_single_line = true
# Format code snippet included in doc comments.
format_code_in_doc_comments = true
# Format the metavariable matching patterns in macros.
format_macro_matchers = true
# Format string literals where necessary
format_strings = true
# Use tab characters for indentation, spaces for alignment
hard_tabs = false
# Indent style of imports
imports_indent = "Block"
# Item layout inside a imports block
imports_layout = "HorizontalVertical"
# Merge multiple imports into a single nested import.
merge_imports = true
# Unix or Windows line endings
newline_style = "Unix"
# Convert /* */ comments to // comments where possible
normalize_comments = true
# Remove nested parens.
remove_nested_parens = true
# Reorder impl items. type and const are put first, then macros and methods.
reorder_impl_items = true
# Reorder import and extern crate statements alphabetically in groups (a group is separated by a newline).
reorder_imports = true
# Reorder mod declarations alphabetically in group.
reorder_modules = true
# Leave a space after the colon.
space_after_colon = true
# Number of spaces per tab
tab_spaces = 4
# How to handle trailing commas for lists
trailing_comma = "Vertical"
# Add trailing semicolon after break, continue and return
trailing_semicolon = true
# Determines if + or = are wrapped in spaces in the punctuation of types
type_punctuation_density = "Wide"
# Use field initialize shorthand if possible.
use_field_init_shorthand = true
# Break comments to fit on the line
wrap_comments = true