46 lines
866 B
TOML
46 lines
866 B
TOML
# Rust formatting configuration
|
|
# Following universal coding standards (Section 8.1)
|
|
|
|
# Maximum line width (Section 1.2: 80-120 chars)
|
|
max_width = 100
|
|
|
|
# Use spaces for Rust (ecosystem convention)
|
|
hard_tabs = false
|
|
tab_spaces = 4
|
|
|
|
# Edition
|
|
edition = "2021"
|
|
|
|
# Imports
|
|
imports_granularity = "Module"
|
|
group_imports = "StdExternalCrate"
|
|
reorder_imports = true
|
|
|
|
# Comments
|
|
wrap_comments = true
|
|
comment_width = 80
|
|
normalize_comments = true
|
|
|
|
# Formatting
|
|
newline_style = "Unix"
|
|
use_small_heuristics = "Default"
|
|
|
|
# Function formatting
|
|
fn_params_layout = "Tall"
|
|
fn_single_line = false
|
|
|
|
# Struct/enum formatting
|
|
struct_lit_single_line = true
|
|
enum_discrim_align_threshold = 20
|
|
|
|
# Match formatting
|
|
match_block_trailing_comma = true
|
|
match_arm_blocks = true
|
|
|
|
# Control flow
|
|
control_brace_style = "AlwaysSameLine"
|
|
|
|
# Misc
|
|
use_field_init_shorthand = true
|
|
use_try_shorthand = true
|