about summary refs log tree commit diff
path: root/src/liballoc_system
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-11-22 03:29:46 -0600
committerGitHub <noreply@github.com>2016-11-22 03:29:46 -0600
commit0f7c75b74fb7adc436eedc66c0032879293eeac6 (patch)
tree2b34cfc1fa6076cbe90a38091e4ba478f92117d2 /src/liballoc_system
parent1c11ea3aedebac562f5125e1cf22ac56a3a8993c (diff)
parent6c2a456bf198e7853f570435fc78bbd99c51b9d6 (diff)
downloadrust-0f7c75b74fb7adc436eedc66c0032879293eeac6.tar.gz
rust-0f7c75b74fb7adc436eedc66c0032879293eeac6.zip
Auto merge of #37834 - bluss:peek-none, r=BurntSushi
Make Peekable remember peeking a None

Peekable should remember if a None has been seen in the `.peek()` method.
It ensures that `.peek(); .peek();` or `.peek(); .next();` only advances the
underlying iterator at most once. This does not by itself make the iterator
fused.

Thanks to @s3bk for the code in `fn peek()` itself.

Fixes #37784
Diffstat (limited to 'src/liballoc_system')
0 files changed, 0 insertions, 0 deletions