macro_rules! wlist {
() => { ... };
($( ($weight:expr, $value:expr) ),* $(,)?) => { ... };
}Expand description
Construct a WeightedList from the provided (weight, value) pairs.
ยงUsage
let wl = wlist![
(2, "sup"),
(3, "nova"),
(5, "shard"),
];
let empty: WeightedList<(), usize> = wlist![];