#rest

iter_fallback

Drive two iters, exhaust first then fallback on the rest of second

3 releases

Uses old Rust 2015

0.1.2 Nov 16, 2018
0.1.1 Nov 16, 2018
0.1.0 Nov 10, 2018

#224 in #rest

Apache-2.0

6KB

crates.io

iter_fallback

An iterator that falls back to a second iterator when the first one is exusted.

 assert_eq!(
            vec![1, 2, 3, 4, 5],
            vec![1, 2, 3]
                .into_iter()
                .fallback(vec![0, 0, 0, 4, 5].into_iter())
                .collect::<Vec<_>>()
        )

No runtime deps