Finding Common Mistakes with Clippy

Learn how to find common mistakes, and try to resolve them using Clippy.

We'll cover the following


Rust ships with a tool called Clippy. Clippy provides hints and guidance while we code. We can type cargo clippy at any time to retrieve a list of suggestions for our project.

Many Clippy warnings will also appear when we compile our programs. Most development environments that support Rust integrate with Clippy and display warnings and hints as we work.

Let’s use Clippy to fix a simple project. Run the program. The program works, but has room for improvement. It’s ignoring some of Rust’s better features and naming conventions.

Get hands-on with 1200+ tech skills courses.