ferrous-di 0.2.0

Type-safe, performant dependency injection for Rust, inspired by Microsoft.Extensions.DependencyInjection
Documentation
# Rust formatting configuration for Ferrous DI
# This configuration ensures consistent code formatting across the project

# Rust edition
edition = "2021"

# Line width - balance readability with screen real estate
max_width = 100

# Use small heuristics for better formatting decisions
use_small_heuristics = "Max"

# Import organization
imports_granularity = "Module"
reorder_imports = true
group_imports = "StdExternalCrate"

# Function formatting
fn_args_layout = "Tall"
brace_style = "SameLineWhere"

# Control flow formatting
control_brace_style = "AlwaysSameLine"
match_arm_blocks = false
match_block_trailing_comma = false

# Array and struct formatting
array_width = 80
struct_field_align_threshold = 0
struct_lit_single_line = true

# String formatting
format_strings = true
format_macro_matchers = true

# Documentation formatting
format_code_in_doc_comments = true
normalize_doc_attributes = true
wrap_comments = true
comment_width = 100

# Trailing elements
trailing_comma = "Vertical"
trailing_semicolon = true

# Spacing and alignment
space_before_colon = false
space_after_colon = true
spaces_around_ranges = false

# Type formatting
use_try_shorthand = true
use_field_init_shorthand = true

# Chain formatting - helps with builder patterns
chain_width = 80
single_line_if_else_max_width = 50

# Macro formatting
format_macro_bodies = true

# Module formatting
module_recurse = true

# Newline formatting
newline_style = "Unix"
empty_item_single_line = true
enum_discrim_align_threshold = 0

# Specific to Ferrous DI patterns
# These settings work well with our service registration patterns
where_single_line = false
force_explicit_abi = true
normalize_comments = true

# Error recovery
error_on_line_overflow = false
error_on_unformatted = false

# Ignore patterns for generated code or external files
ignore = [
    "target/",
    "benches/criterion/",
]

# Version-specific options (requires nightly rustfmt for some)
# Uncomment when using nightly rustfmt
# format_generated_files = false
# skip_children = false