mirror of
https://github.com/bevyengine/bevy
synced 2024-11-25 22:20:20 +00:00
Fix documentation comment for State::overwrite_next (#1291)
This commit is contained in:
parent
7166a28baf
commit
f2b73eaa8a
1 changed files with 1 additions and 1 deletions
|
@ -247,7 +247,7 @@ impl<T: Clone> State<T> {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
/// Same as [Self::queue], but if there is already a next state, it will be overwritten instead of failing
|
||||
/// Same as [Self::set_next], but if there is already a next state, it will be overwritten instead of failing
|
||||
pub fn overwrite_next(&mut self, state: T) -> Result<(), StateError> {
|
||||
if std::mem::discriminant(&self.current) == std::mem::discriminant(&state) {
|
||||
return Err(StateError::AlreadyInState);
|
||||
|
|
Loading…
Reference in a new issue