bluejay_validator/chain_iters.rs
1#[macro_export]
2macro_rules! chain_types {
3 ( $first:ty, $( $rest:ty ),+ $(,)? ) => {
4 std::iter::Chain<$crate::chain_types!($($rest),+), $first>
5 };
6 ( $t:ty ) => { $t };
7}
8
9#[macro_export]
10macro_rules! chain_iters {
11 ( $first:expr, $( $rest:expr ),+ $(,)? ) => {
12 $crate::chain_iters!($($rest),+).chain($first)
13 };
14 ( $iter:expr ) => { $iter };
15}