Skip to content

Commit

Permalink
cargo clippy (#414)
Browse files Browse the repository at this point in the history
1.84.0 stable broke CI because a new warn-by-default lint was added: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
  • Loading branch information
parasyte authored Jan 26, 2025
1 parent 3fc9ea2 commit 2a99115
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/invaders/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ impl Game {

left |= gamepad.is_pressed(Button::DPadLeft);
right |= gamepad.is_pressed(Button::DPadRight);
fire |= gamepad.button_data(Button::South).map_or(false, |button| {
fire |= gamepad.button_data(Button::South).is_some_and(|button| {
button.is_pressed() && button.counter() == self.gilrs.counter()
});
pause |= gamepad.button_data(Button::Start).map_or(false, |button| {
pause |= gamepad.button_data(Button::Start).is_some_and(|button| {
button.is_pressed() && button.counter() == self.gilrs.counter()
});
}
Expand Down

0 comments on commit 2a99115

Please sign in to comment.