rust/library/core
bors b387f62d4d Auto merge of #77491 - lukaslueg:peek_mut, r=m-ou-se
Proposal to add Peekable::peek_mut

A "peekable" iterator has a `peek()`-method which provides an immutable reference to the next item. We currently do not have a method to modify that item, which we could easily add via a `peek_mut()`. See the test for a use-case (alike to my original use case), where a "pristine" iterator is passed on after modifying its state via `peek_mut()`.

If there is interest in this, I can expand on the tests and docs.
2020-11-25 05:10:53 +00:00
..
benches
src Auto merge of #77491 - lukaslueg:peek_mut, r=m-ou-se 2020-11-25 05:10:53 +00:00
tests Add Peekable::peek_mut 2020-11-23 23:52:19 +01:00
Cargo.toml