I am trying to use itertools::PutBack::put_back in a loop. It is the event loop of a lexical analyzer state machine. I keep running afoul of the borrow checker. Does anyone have an example of how to use put_back properly?
In particular, I will be iterating over the characters in a string.