What problem does it solve?
Ensures Rust code is idiomatic, consistent, and safe by reducing bugs from ownership mistakes, inconsistent error handling, and style divergence across a codebase.
Core Features & Use Cases
- Naming & Style: Enforces snake_case for functions and modules, PascalCase for types, and UPPER_SNAKE_CASE for constants.
- Error Handling & Options: Recommends Result-based error propagation, avoids unwrap/expect in production, and prefers thiserror/anyhow patterns.
- Modules, Concurrency & Performance: Guides module layout, ownership and borrowing practices, concurrency best practices, and performance idioms like iterator usage and preallocation.
- Use Cases: Use when authoring new crates, performing code reviews, or refactoring to improve safety and maintainability.
Quick Start
Review src/lib.rs and suggest changes to naming, error handling, ownership, formatting, and clippy warnings to make the code idiomatic and safe.