rust-lang/rust — pull request #15551 by SimonSapin (2014-07-09 14:58:13+00:00)
Title: Add a put_pack() method to the Peekable iterator.

Sometimes, rather than peek()’ing and then potentialy calling next() to go past the item you’ve already handled, it’s more convenient to call next() first and potentially put the item "back" in the iterator, to be consumed by another part of the code.

As shown in tests, the parameter need not actually come from the iterator, but it usually is in more typical usage.

(I assumed this addition was small enough to not need an RFC.)