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.180 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.179 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.178 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.177 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.176 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.175 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.174 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.173 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.172 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.171 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.170 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.169 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.167 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.166 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.165 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.164 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.163 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.162 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.161 tracks/rust/exercises/macros/example.rs
trackler-2.2.1.160 tracks/rust/exercises/macros/example.rs