velcro 0.5.4

Convenience macros for initializing vectors, hash maps and other Rust collections.
Documentation
1
2
3
4
5
6
7
8
9
10
11
//! Tests for https://github.com/peterjoel/velcro/issues/7
use velcro::*;

#[test]
fn expressions_with_paths_should_be_permitted_as_hash_map_keys() {
    let map = hash_map! {
        String::from("foo"): 1,
    };

    assert_eq!(map.get(&String::from("foo")), Some(&1));
}