When implementing accept_eof from the Automaton trait I noticed that it did not behave as I expected when using the automaton in a search_with_state. In cases in which accept_eof produced a match the state returned in the stream was not the one returned by accept_eof.
The fix in this PR works well for my use case, I hope it confirms to how accept_eof is intended to work.
When implementing
accept_eof
from theAutomaton
trait I noticed that it did not behave as I expected when using the automaton in asearch_with_state
. In cases in whichaccept_eof
produced a match the state returned in the stream was not the one returned byaccept_eof
.The fix in this PR works well for my use case, I hope it confirms to how
accept_eof
is intended to work.