2 unstable releases

0.2.0 Dec 22, 2019
0.1.0 Mar 2, 2019

#2078 in Rust patterns

29 downloads per month

CC0 license

7KB
135 lines

Literals for Rust's collections

use std::collections::HashMap;
use literal::{map,MapLiteral};

fn main() {
    let m: HashMap<String,i32> = map!{"x": 0, "y": 1};
    println!("{:?}",m);
}

No runtime deps