# Rust formatting rules for the "nightly" edition
#
# General settings
= "2024" # Rust 2024 edition
= 100 # Maximum line width
= "Max" # Try to keep small code blocks on a single line
= false # Use tabs instead of spaces (false = spaces)
= 4 # One tab = 4 spaces
# Functions and parameters
= "Vertical" # Place each function parameter on a new line if the line is too long
# Code layout
= false # Keep the items inside `impl` blocks in their current order: False to keep traits impls in same order with trait
= "Never" # Trailing comma behavior
= true # Require an explicit ABI for external functions
= false # Do not wrap comments automatically to fit the line width
# Structs and enums
= 80 # Maximum width for struct literals
= 0 # Alignment threshold for struct fields
= 0 # Alignment threshold for enum discriminants
= "Module"
= "StdExternalCrate" # Group imports in a consistent order
= true # Sort imports alphabetically