pub fn update(&mut self, state_data: &mut S) {
        let trans = match self.state_stack.last_mut() {
            Some(state) => state.update(state_data),
            None => StateTransition::None,
        };

        self.transition(trans, state_data);
    }
/// Updates the state at the top of the stack with the provided data.
/// If the states returns a transition, perform it.
Updates the state at the top of the stack with the provided data.
If the states returns a transition, perform it.
Updates the state at the top of the stack with the provided data . If the states returns a transition perform it .
pub fn update(&mut self, state_data: &mut S) {
        let trans = match self.state_stack.last_mut() {
            Some(state) => state.update(state_data),
            None => StateTransition::None,
        };
        self.transition(trans, state_data);
    }
pub fn update ( & mut self , state_data : & mut S ) { let trans = match self . state_stack . last_mut ( ) { Some ( state ) => state . update ( state_data ) , None => StateTransition :: None , } ; self . transition ( trans , state_data ) ; }
Updates the state at the top of the stack with the provided data.
Updates the state at the top of the stack with the provided data .
&mut self
state_data
&mut S
&mut self
state_data
&mut S