You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this case the call to dosth() will return a stateless BobTheBuilder.
This is unexpected, because this basically switches the state from FullyConfigured to stateless without a switch_to statement. On the other hand this can be fixed by adding a switch_to macro to the initial state.
So this implementation
This behaviour took me by surprise. I would have expected that the OutputState = InputState as long as I do not call switch_to and that I would not need to add switch_to as long as I just want to require a state and update the struct, but do not want to change the state. The current behaviour is kind of the inverse of what I expected by intuition.
The text was updated successfully, but these errors were encountered:
What happened?
In this case the call to
dosth()
will return a stateless BobTheBuilder.This is unexpected, because this basically switches the state from
FullyConfigured
to stateless without a switch_to statement. On the other hand this can be fixed by adding a switch_to macro to the initial state.So this implementation
works as expected.
Expected behavior
This behaviour took me by surprise. I would have expected that the OutputState = InputState as long as I do not call switch_to and that I would not need to add switch_to as long as I just want to require a state and update the struct, but do not want to change the state. The current behaviour is kind of the inverse of what I expected by intuition.
The text was updated successfully, but these errors were encountered: