Merging Iterator
This crate implements an iterator, that takes two independent iterators and returns their elements in order, given the two input iterators are sorted itself.
Important note: This iterator only works if the input iterators are already sorted since only the respective next
elements of each iterator are compared. There are no checks in place to validate this property.
Example
extern crate merging_iterator;
use MergeIter;
let a = vec!.into_iter;
let b = vec!.into_iter;
let merger = new;
assert_eq!;
You can also merge more than two sorted iterators like this:
extern crate merging_iterator;
use MergeIter;
let a = vec!.into_iter;
let b = vec!.into_iter;
let c = vec!.into_iter;
let merger = new;
assert_eq!;
License
merging-iterator
is licensed under either of the following, at your option:
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)