use leafwing_input_manager::Actionlike; use leafwing_input_manager::prelude::ActionState; pub trait ActionStateExt { fn button_changed(&self, a: &A) -> bool; } impl ActionStateExt for ActionState { fn button_changed(&self, a: &A) -> bool { self.just_pressed(a) || self.just_released(a) } }