https://github.com/avi-d-coder/iter_fallback
Drive two iters, exhaust first then fallback on the rest of second
https://github.com/avi-d-coder/iter_fallback
fallback iterative-methods iterator rust rust-language
Last synced: 9 months ago
JSON representation
Drive two iters, exhaust first then fallback on the rest of second
- Host: GitHub
- URL: https://github.com/avi-d-coder/iter_fallback
- Owner: Avi-D-coder
- License: apache-2.0
- Created: 2018-11-10T03:14:23.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-19T01:02:54.000Z (about 7 years ago)
- Last Synced: 2025-02-28T08:52:40.742Z (10 months ago)
- Topics: fallback, iterative-methods, iterator, rust, rust-language
- Language: Rust
- Homepage:
- Size: 15.6 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
[](https://crates.io/crates/iter_fallback)
# iter_fallback
An iterator that falls back to a second iterator when the first one is exusted.
```rs
assert_eq!(
vec![1, 2, 3, 4, 5],
vec![1, 2, 3]
.into_iter()
.fallback(vec![0, 0, 0, 4, 5].into_iter())
.collect::>()
)
```