fullypeek

Crates.iofullypeek
lib.rsfullypeek
version0.1.0
sourcesrc
created_at2023-10-15 05:09:54.302473
updated_at2023-10-15 05:09:54.302473
descriptionPeek forward in an iterator as far as you'd like, memory allowing!
homepage
repositoryhttps://github.com/clintval/fullypeek
max_upload_size
id1003497
size2,326,525
Clint Valentine (clintval)

documentation

https://github.com/clintval/fullypeek/README.md

README

fullypeek

Build Status Coverage Status Language

Peek forward in an iterator as far as you'd like, memory allowing!

El Chorro, Spain

let mut peekable = vec![1, 2, 3].into_iter().fully_peekable();

assert_eq!(peekable.peek(), Some(&1));
assert_eq!(peekable.peek_many(2), vec!(Some(&1), Some(&2)));

peekable.next();

assert_eq!(peekable.peek(), Some(&2));
assert_eq!(peekable.peek_many(2), vec!(Some(&2), Some(&3)));

peekable.next();

assert_eq!(peekable.peek(), Some(&3));
assert_eq!(peekable.peek_many(2), vec!(Some(&3), None));
Commit count: 3

cargo fmt