Macro velcro::linked_list

source ·
linked_list!() { /* proc-macro */ }
Expand description

An initializer for LinkedList, allowing for items to be specified individually or “spread” using the .. operator.

Usage

use velcro::linked_list;
let list: LinkedList<_> = (0..7).into_iter().collect();

assert_eq!(linked_list![..(0..7)], list);
assert_eq!(linked_list![0, 1, ..(2..7)], list);