Registry / utility / maplit

maplit

JSON →
library1.0.2rscratesunverified

Collection literal macros for HashMap, HashSet, BTreeMap, and BTreeSet.

# Cargo.toml [dependencies] maplit = "1.0.2"
INSTALL
IMPORT
SIG · MAPLIT
M
maplit
utilityrustv1.0.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

hashmap
use maplit::hashmap;

Creates a HashMap using a literal macro.

use maplit::hashmap; fn main() { let map = hashmap! { "a" => 1, "b" => 2, }; println!("{:?}", map); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.0.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
maplit — cargo add maplit · libregistry