Crates.io | iter_fallback |
lib.rs | iter_fallback |
version | 0.1.2 |
source | src |
created_at | 2018-11-10 03:27:22.68767 |
updated_at | 2018-11-16 05:15:17.070822 |
description | Drive two iters, exhaust first then fallback on the rest of second |
homepage | |
repository | https://github.com/Avi-D-coder/iter_fallback |
max_upload_size | |
id | 95759 |
size | 13,790 |
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<_>>()
)