I almost got locked out of my machine because I misunderstood the purpose of the function and called it with a limit of uint::max_value, which turned this function into an almost endless loop.
cont
};
- ss.iter().enumerate().advance(machine);
+ ss.iter().enumerate().advance(|x| machine(x));
// Let the automaton 'run out' by supplying trailing whitespace
- let mut fake_i = ss.len();
while cont && match state { B | C => true, A => false } {
machine((fake_i, ' '));
fake_i += 1;