Skip to main content


Building a small personal project in #Rust to teach myself the language. As I was looking over my code, I noticed a mistake I'd made that technically worked, but was kind of silly so I fixed it.

This got me to wondering if Rust had a linter (it does) because surely I'd made other similar rookie mistakes. I found the linter and ran it on my project. It came back with one result that I already knew about: a value in a struct that doesn't get read because I haven't written that code yet. That was it.

I was surprised. It's still a very small project, but perhaps I'm a more competent developer than I give myself credit for.

#rust

reshared this

in reply to Jonathan Lamothe

Clippy by default only flags some correctness things. Turn on pedantic mode if you want to see more suggestions. !#[warn(clippy::pedantic)] at the top of your main.rs or lib.rs
in reply to Dylan :heart_nb:

@Dylan :heart_nb: As it turns out, doing this introduced me to a couple language features I wasn't aware of, so thanks again. ๐Ÿ™‚
in reply to Jonathan Lamothe

They add new lints with every new version of Rust, so it continues to help introduce me to newer features โ˜บ๏ธ

This website uses cookies. If you continue browsing this website, you agree to the usage of cookies.

โ‡ง