Clippy - example 10.
@@ -38,13 +38,10 @@ impl GameState for State {
None => {} // Nothing happened
Some(key) => {
// A key is pressed or held
- match key {
- VirtualKeyCode::B => {
+ if let VirtualKeyCode::B = key {
self.burn = !self.burn;
ctx.with_post_scanlines(self.burn);
}
- _ => {}
- }
}
}
}
