[][src]Macro lab_grader::data

macro_rules! data {
    { $($key:expr => $value:expr),+ } => { ... };
}

A macro to easily create a HashMap<String, String>

Example


// The long way
let mut map = HashMap::new();
map.insert(String::from("key"), String::from("value"));

// the macro way
let data = data! { "key" => "value" };
assert_eq!(map, data);