-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrustfmt.toml
More file actions
66 lines (53 loc) · 1.67 KB
/
rustfmt.toml
File metadata and controls
66 lines (53 loc) · 1.67 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
# Rust Formatting Configuration
# This file defines explicit formatting rules for the project.
# Run with: cargo fmt
# Check with: cargo fmt --check
#
# Note: We only use stable rustfmt options here. Unstable options would require
# nightly toolchain and are commented out below for reference.
# Edition to use for parsing (matches Cargo.toml)
edition = "2024"
# Maximum line width
max_width = 100
# Use spaces for indentation
hard_tabs = false
tab_spaces = 4
# Import ordering
reorder_imports = true
reorder_modules = true
# Keep newlines for readability
newline_style = "Unix"
# Function signatures
fn_params_layout = "Tall"
# Match arm formatting
match_block_trailing_comma = true
# Use field init shorthand where possible
use_field_init_shorthand = true
# Merge derives into a single attribute
merge_derives = true
# Use try! shorthand (?)
use_try_shorthand = true
# Chain formatting
chain_width = 60
# Array formatting
array_width = 60
# ----------------------------------------------------------------------------
# Unstable options (require nightly toolchain)
# Uncomment these if using nightly rustfmt:
# ----------------------------------------------------------------------------
# imports_granularity = "Module"
# group_imports = "StdExternalCrate"
# wrap_comments = false
# normalize_comments = false
# normalize_doc_attributes = true
# format_code_in_doc_comments = true
# struct_lit_single_line = true
# fn_single_line = false
# where_single_line = false
# overflow_delimited_expr = true
# enum_discrim_align_threshold = 20
# match_arm_blocks = true
# brace_style = "SameLineWhere"
# control_brace_style = "AlwaysSameLine"
# blank_lines_upper_bound = 2
# blank_lines_lower_bound = 0