mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 08:11:33 +11:00
Fix clippy lints (#611)
This commit is contained in:
commit
6704b96fda
|
@ -16,7 +16,7 @@ fn main(mut gba: agb::Gba) -> ! {
|
||||||
}
|
}
|
||||||
if input.is_just_pressed(agb::input::Button::B) {
|
if input.is_just_pressed(agb::input::Button::B) {
|
||||||
#[allow(arithmetic_overflow)]
|
#[allow(arithmetic_overflow)]
|
||||||
let _p = core::i32::MAX + 1;
|
let _p = i32::MAX + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -390,8 +390,7 @@ impl CursorState {
|
||||||
let mut new_x = current_x.saturating_add_signed(lr as isize).max(1);
|
let mut new_x = current_x.saturating_add_signed(lr as isize).max(1);
|
||||||
let new_y = current_y
|
let new_y = current_y
|
||||||
.saturating_add_signed(ud as isize)
|
.saturating_add_signed(ud as isize)
|
||||||
.max(1)
|
.clamp(1, PLAY_AREA_HEIGHT - 2);
|
||||||
.min(PLAY_AREA_HEIGHT - 2);
|
|
||||||
|
|
||||||
if new_x == PLAY_AREA_WIDTH - 1 {
|
if new_x == PLAY_AREA_WIDTH - 1 {
|
||||||
new_x = new_x.min(PLAY_AREA_WIDTH - 2);
|
new_x = new_x.min(PLAY_AREA_WIDTH - 2);
|
||||||
|
|
Loading…
Reference in a new issue