rust-anti-pattern
Installation
SKILL.md
Top 5 Beginner Mistakes
| Rank | Mistake | Correct Approach |
|---|---|---|
| 1 | Using .clone() to escape borrow checker |
Use references |
| 2 | Using .unwrap() in production code |
Use ? or with_context() |
| 3 | Everything is String |
Use &str, Cow<str> when needed |
| 4 | Index-based loops | Use iterators .iter(), .enumerate() |
| 5 | Fighting lifetimes | Redesign data structure |