Sha256: 19dc3fffd215d82468d53050b61a058c8b79ee3a14173a91178669b1c5517307

Contents?: true

Size: 519 Bytes

Versions: 107

Compression:

Stored size: 519 Bytes

Contents

// Ignoring the README's injunction, this is heavily based on the implementation from maplit.
// Original source is at https://github.com/bluss/maplit/blob/master/src/lib.rs#L27-L60

#[macro_export]
macro_rules! hashmap {
    ($($key:expr => $value:expr,)+) => { hashmap!($($key => $value),+) };
    ($($key:expr => $value:expr),*) => {
        {
            let mut _map = ::std::collections::HashMap::new();
            $(
                _map.insert($key, $value);
            )*
            _map
        }
    };
}

Version data entries

107 entries across 107 versions & 1 rubygems

Version Path
trackler-2.2.1.139 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.138 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.137 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.136 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.135 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.134 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.133 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.132 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.131 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.130 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.129 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.128 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.127 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.126 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.125 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.124 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.123 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.122 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.121 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.120 tracks/rust/exercises/macros/example.rs