Registry / utility / collect-mac

collect-mac

JSON →
library0.1.0rscratesunverified

Provides the `collect!` macro to easily construct arbitrary collections like Vec, String, and HashMap with single allocation where possible.

# Cargo.toml [dependencies] collect-mac = "0.1.0"
INSTALL
IMPORT
SIG · COLLECT-MAC
C
collect-mac
utilityrustv0.1.0
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.

collect
✓ use collect_mac::collect;

Constructs a HashMap using the collect! macro.

use collect_mac::collect; fn main() { let map = collect! { HashMap<String, i32> => "a" => 1, "b" => 2, }; assert_eq!(map["a"], 1); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.1.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
collect-mac — cargo add collect-mac · libregistry