Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - Bugfix State::set transition condition infinite loop #4890

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update doc to reflect transition condition
  • Loading branch information
siph committed Jun 1, 2022
commit 7af182b058ec4a5df4af9c50eb6d52f9f428ba85
4 changes: 2 additions & 2 deletions crates/bevy_ecs/src/schedule/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ where
}

/// Schedule a state change that replaces the active state with the given state.
/// This will fail if there is a scheduled operation, or if the given `state` matches the
/// current state
/// This will fail if there is a scheduled operation, pending transition, or if the given
/// `state` matches the current state
pub fn set(&mut self, state: T) -> Result<(), StateError> {
if self.stack.last().unwrap() == &state {
return Err(StateError::AlreadyInState);
Expand Down