kpcyrd / game-dont-panic

Pure Rust firmware, bare metal Space Invaders/Endoparasitic crossover game for waveshare-rp2040-zero, with a 128x64 OLED i2c screen, a rotary encoder and a button
GNU General Public License v3.0
10 stars 1 forks source link

Clippy cleanup #1

Open bsodmike opened 3 weeks ago

bsodmike commented 3 weeks ago

Hi, quick heads up

warning: irrefutable `if let` pattern
   --> src/main.rs:401:16
    |
401 |             if let (Ok(button1), Ok(button2)) = (button1.is_high(), button2.is_high()) {
kpcyrd commented 3 weeks ago

hi, thanks for letting me know :)

I'm having issues reproducing this with Rust 1.81.0, I would assume this to be refutable if .is_high() on either button1 or button2 returns an error (at least the api is forcing me to consider the Err(_) case).

bsodmike commented 3 weeks ago

Yeah, I was using 1.82.0-beta.5, but switched to stable. FYI I also saw on stable.

warning: the `-Cinline-threshold` flag is deprecated and does nothing (consider using `-Cllvm-args=--inline-threshold=...`)

Apart from the warning you can close this :)

bsodmike commented 3 weeks ago

Oh you can add a rust-toolchain.toml and set stable by default maybe?