Clippy Config Should Be Stricter
The article discusses the importance of stricter Clippy configurations in Rust programming to prevent production bugs. It highlights a specific incident where a bug caused an email sending job to fail due to improper string slicing. The author advocates for enabling more Clippy lints to enhance code safety, especially when working with coding agents.
- ▪Stricter Clippy lints can help catch bugs that the Rust compiler may not prevent.
- ▪A recent bug in the author's project was caused by improper UTF-8 string slicing.
- ▪Enabling more Clippy lints can make code safer and easier to rely on, especially for less experienced developers.
Opening excerpt (first ~120 words) tap to expand
Your Clippy Config Should Be Stricter 30 Apr, 2026 “If it compiles, it works.” This feeling is one of the main things Rust engineers love most about Rust, and a reason why using it with coding agents is especially nice. After debugging some code that compiled but mysteriously stopped in production, I realized that it’s useful to enable more Clippy lints to catch bugs that the compiler won't prevent by itself. It's especially useful as guardrails for coding agents, but stricter linting can make your code safer, whether or not you’re coding with LLMs. Motivating Bug: UTF-8-Oblivious String SlicingScour is the personalized content feed that I work on. Every Friday, Scour sends an email digest to each user with the top posts that matched their interests.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at Evan Schwartz.