fix clippy and check it on ci (#18)
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user