-
Notifications
You must be signed in to change notification settings - Fork 196
Expand file tree
/
Copy pathrustfmt.toml
More file actions
36 lines (29 loc) · 891 Bytes
/
Copy pathrustfmt.toml
File metadata and controls
36 lines (29 loc) · 891 Bytes
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
# Rust formatter configuration (stable features only)
# See: https://rust-lang.github.io/rustfmt/
edition = "2024"
# Formatting options
max_width = 100
hard_tabs = false
tab_spaces = 4
newline_style = "Unix"
# Code style
use_small_heuristics = "Default"
fn_call_width = 80
struct_lit_width = 80
chain_width = 80
# Match formatting
match_block_trailing_comma = true
# Use field init shorthand
use_field_init_shorthand = true
# Misc
remove_nested_parens = true
# Note: The following features require nightly Rust:
# - wrap_comments, comment_width, normalize_comments
# - format_code_in_doc_comments, format_strings, format_macro_bodies
# - imports_granularity, group_imports
# - overflow_delimited_expr, trailing_comma, trailing_semicolon
# - blank_lines_upper_bound, blank_lines_lower_bound
# - reorder_impl_items
#
# To use these features, switch to nightly:
# rustup default nightly