fix clippy and check it on ci (#18)

This commit is contained in:
extrawurst
2025-03-26 01:20:38 +01:00
committed by GitHub
parent 17406b1f00
commit 9842148010
14 changed files with 85 additions and 53 deletions

View File

@@ -280,17 +280,13 @@ fn swap_head_inputs(
}
let mut changed = false;
if action == BackpackAction::Left {
if state.current_slot > 0 {
state.current_slot -= 1;
changed = true;
}
if action == BackpackAction::Left && state.current_slot > 0 {
state.current_slot -= 1;
changed = true;
}
if action == BackpackAction::Right {
if state.current_slot < state.count.saturating_sub(1) {
state.current_slot += 1;
changed = true;
}
if action == BackpackAction::Right && state.current_slot < state.count.saturating_sub(1) {
state.current_slot += 1;
changed = true;
}
if action == BackpackAction::Swap {
commands.trigger(BackbackSwapEvent(state.current_slot));