Fix documentation comment for State::overwrite_next (#1291)
This commit is contained in:
parent
7166a28baf
commit
f2b73eaa8a
@ -247,7 +247,7 @@ impl<T: Clone> State<T> {
|
|||||||
Ok(())
|
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> {
|
pub fn overwrite_next(&mut self, state: T) -> Result<(), StateError> {
|
||||||
if std::mem::discriminant(&self.current) == std::mem::discriminant(&state) {
|
if std::mem::discriminant(&self.current) == std::mem::discriminant(&state) {
|
||||||
return Err(StateError::AlreadyInState);
|
return Err(StateError::AlreadyInState);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user