rahul-thakoor / rust_gpiozero

A library inspired by gpiozero written in Rust
https://crates.io/crates/rust_gpiozero
Apache License 2.0
233 stars 27 forks source link

Run `cargo fmt` and fix all warnings, including ones from clippy #19

Closed AldaronLau closed 4 years ago

AldaronLau commented 4 years ago

I recommend always running cargo fmt before doing any commits; It makes it a lot easier to read the code.

rahul-thakoor commented 4 years ago

should we add rustfmt.toml and clippy.toml for consistency?

AldaronLau commented 4 years ago

It's my understanding that rustfmt.toml is for customizing the formatting. Leaving it out just means you use the default formatting. Personally, I like to add max_width = 80, but I'll leave that up to your judgement (default is 100). I imagine clippy.toml is in a similar situation, though I have never used it myself. I don't think adding the files would be helpful unless you want to customize rustfmt's and clippy's behaviour.

rahul-thakoor commented 4 years ago

Ok that makes sense regarding the configuration files