fn pop(&mut self, data: StateData<'_, T>) {
        if self.running {
            let StateData {
                context: state_manager,
                world,
                data,
            } = data;
            if let Some(mut state) = self.state_stack.pop() {
                state.on_stop(StateData {
                    context: state_manager,
                    world,
                    data,
                });
            }

            if let Some(state) = self.state_stack.last_mut() {
                state.on_resume(StateData {
                    context: state_manager,
                    world,
                    data,
                });
            } else {
                self.running = false;
            }
        }
    }
/// Stops and removes the active state and un-pauses the next state on the
/// stack (if any).
Stops and removes the active state and un-pauses the next state on the
stack (if any).
Stops and removes the active state and un - pauses the next state on the stack ( if any ) .
fn pop(&mut self, data: StateData<'_, T>) {
        if self.running {
            let StateData {
                context: state_manager,
                world,
                data,
            } = data;
            if let Some(mut state) = self.state_stack.pop() {
                state.on_stop(StateData {
                    context: state_manager,
                    world,
                    data,
                });
            }
            if let Some(state) = self.state_stack.last_mut() {
                state.on_resume(StateData {
                    context: state_manager,
                    world,
                    data,
                });
            } else {
                self.running = false;
            }
        }
    }
fn pop ( & mut self , data : StateData < ' _ , T > ) { if self . running { let StateData { context : state_manager , world , data , } = data ; if let Some ( mut state ) = self . state_stack . pop ( ) { state . on_stop ( StateData { context : state_manager , world , data , } ) ; } if let Some ( state ) = self . state_stack . last_mut ( ) { state . on_resume ( StateData { context : state_manager , world , data , } ) ; } else { self . running = false ; } } }
Stops and removes the active state and un-pauses the next state on the
stack (if any).
Stops and removes the active state and un - pauses the next state on the stack ( if any ) .
&mut self
data
StateData<'_, T>
&mut self
data
StateData<'_, T>