fn perform(&mut self, action: KeypadAction) {
            match action {
                KeypadAction::Press => {
                    if !self.keypad.press(self.hovering) {
                        // NOTE: if self.hovering is not in the keypad it is a Finger impl bug.
                        panic!("buggy hovering button handling in Finger");
                    }
                }
                KeypadAction::Move(direction) => {
                    let neighbour = self.keypad.neighbour_of(self.hovering, direction);
                    if let Some(button) = neighbour {
                        self.hovering = button;
                    }
                }
            }
        }
/// Perform the given `KeypadAction` on our keypad.
///
/// Returns the hovering button after the action has resolved.
Perform the given `KeypadAction` on our keypad.
Returns the hovering button after the action has resolved.
Perform the given ` KeypadAction ` on our keypad . Returns the hovering button after the action has resolved .
fn perform(&mut self, action: KeypadAction) {
            match action {
                KeypadAction::Press => {
                    if !self.keypad.press(self.hovering) {
                        // NOTE: if self.hovering is not in the keypad it is a Finger impl bug.
                        panic!("buggy hovering button handling in Finger");
                    }
                }
                KeypadAction::Move(direction) => {
                    let neighbour = self.keypad.neighbour_of(self.hovering, direction);
                    if let Some(button) = neighbour {
                        self.hovering = button;
                    }
                }
            }
        }
fn perform ( & mut self , action : KeypadAction ) { match action { KeypadAction :: Press => { if ! self . keypad . press ( self . hovering ) { // NOTE: if self.hovering is not in the keypad it is a Finger impl bug. panic ! ( " " ) ; } } KeypadAction :: Move ( direction ) => { let neighbour = self . keypad . neighbour_of ( self . hovering , direction ) ; if let Some ( button ) = neighbour { self . hovering = button ; } } } }
Perform the given `KeypadAction` on our keypad.
Perform the given ` KeypadAction ` on our keypad .
&mut self
action
KeypadAction
&mut self
action
KeypadAction