peek-again 0.3.0

A performant iterator providing double peek functionality.
Documentation
1
2
3
4
5
6
#[no_mangle]
pub fn std_analysis(bytes: &[u8]) -> impl Iterator<Item = &u8> {
    let mut iter = bytes.into_iter().peekable();
    iter.next_if(|x| *x == &69);
    iter
}