wlist

Macro wlist 

Source
macro_rules! wlist {
    ( $( $item: expr ),* $(,)? ) => { ... };
}
Expand description

Construct a WeightedList from the provided (weight, value) pairs.

ยงUsage

let list = wlist![
    (2, String::from("sup")),
    (3, String::from("nova")),
    (5, String::from("shard")),
];