- Add comprehensive doc comments to all public functions, structs, and modules following RUST_STANDARDS.md format - Add unit tests for models.rs (serialization, deserialization, response creation) - Add unit tests for db.rs (key building, parsing, expiration checking) - Fix clippy warnings (unused imports, dead code, large enum variant with Box<PricingData>) - Add rustfmt.toml and clippy.toml configuration files - Add check-quality.sh script for running all quality checks - Add fix-quality.sh script for automatically fixing formatting and clippy issues - Verify cargo doc generates clean documentation with no warnings - 25 tests added (22 passing, 3 need JSON deserialization fixes) Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
56 lines
993 B
TOML
56 lines
993 B
TOML
# Rust formatting configuration for crud-pricing
|
|
#
|
|
# This configures rustfmt for consistent code formatting across the project.
|
|
# Run with: cargo fmt
|
|
|
|
# Edition
|
|
edition = "2021"
|
|
|
|
# Maximum line width
|
|
max_width = 100
|
|
|
|
# Use tabs (false = spaces)
|
|
hard_tabs = false
|
|
|
|
# Tab width/spaces
|
|
tab_spaces = 4
|
|
|
|
# Newline style
|
|
newline_style = "Unix"
|
|
|
|
# Use field init shorthand if possible
|
|
use_field_init_shorthand = true
|
|
|
|
# Use try shorthand
|
|
use_try_shorthand = true
|
|
|
|
# Format string literals where necessary
|
|
format_strings = true
|
|
|
|
# Merge imports
|
|
imports_granularity = "Crate"
|
|
|
|
# Group imports
|
|
group_imports = "StdExternalCrate"
|
|
|
|
# Reorder imports
|
|
reorder_imports = true
|
|
|
|
# Reorder modules
|
|
reorder_modules = true
|
|
|
|
# Match block trailing comma
|
|
match_block_trailing_comma = true
|
|
|
|
# Wrap comments at max_width
|
|
wrap_comments = true
|
|
|
|
# Format doc comments
|
|
format_code_in_doc_comments = true
|
|
|
|
# Normalize doc attributes
|
|
normalize_doc_attributes = true
|
|
|
|
# Use small heuristics
|
|
use_small_heuristics = "Default"
|