Macro concat_vec

Source
macro_rules! concat_vec {
    ( $( $sliceable:expr ),* ) => { ... };
}
Expand description

Concatenate multiple sliceable structs like Vec or String.

Does not mutate the input structs.

#[macro_use] extern crate colmac;

let a = vec![1, 2];
let b = vec![3, 4];
let c = vec![5, 6];

assert_eq!(concat_vec![a, b], vec![1, 2, 3, 4]);
assert_eq!(concat_vec![a, c, b], vec![1, 2, 5, 6, 3, 4]);