maverick-rust-clippy

Rust Clippy lints and common fixes

⭐0stars🔀0forks📁View on GitHub🕐Updated Jan 7, 2026

When & Why to Use This Skill

This Claude skill enhances Rust development by identifying and resolving common Clippy lints. It provides actionable fixes for performance bottlenecks and memory inefficiencies, such as redundant clones and needless borrows, to ensure idiomatic and high-performance Rust code.

Use Cases

  • Automated Code Review: Quickly scan Rust source code to detect and fix common anti-patterns identified by the Clippy linter.
  • Performance Optimization: Identify and eliminate unnecessary memory allocations by replacing redundant clones with moves.
  • Memory Management: Detect large enum variants that increase stack size and receive suggestions for boxing to optimize memory usage.
  • Code Simplification: Clean up codebases by removing needless borrows and simplifying complex reference structures for better readability.
namemaverick-rust-clippy
descriptionRust Clippy lints and common fixes
version1.0.0

Rust Clippy Skill

Must-Fix Lints

clippy::redundant_clone

// BAD
let s = String::from("hello");
let s2 = s.clone();
drop(s);  // s never used again

// GOOD
let s = String::from("hello");
let s2 = s;  // Move instead of clone

clippy::needless_borrow

// BAD
foo(&mut &mut x);

// GOOD
foo(&mut x);

clippy::large_enum_variant

Box large enum variants to reduce enum size.

Review Severity

  • MAJOR: redundant_clone, needless_borrow
  • MINOR: Most other Clippy warnings
  • SUGGESTION: Could simplify with Clippy suggestion