#iterator #macro-rules #macro #unpack

itermacros

Some useful macros related to iterators

1 unstable release

0.1.0 Jan 12, 2024

#16 in #unpack

MIT license

12KB
185 lines

Some useful macros related to iterators.

Examples

# use itermacros::iunpack;

let x = iunpack!(a, b, *c, d = 0..=5 => {
    (a, b, c, d)
} else panic!());
assert_eq!(x, (0, 1, vec![2, 3, 4], 5));

No runtime deps