Skip to content

HashMap macro similiar to vec! to get familiar with declarative macros in Rust. Based on https://exercism.org/tracks/rust/exercises/macros

Notifications You must be signed in to change notification settings

NicolasFrantzen/hashmap_macro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HashMap macro

This is an attempt to solve following exercise (for learning purpose): https://exercism.org/tracks/rust/exercises/macros

Usage example:

use hashmap_macro::hashmap;
use std::collections::HashMap;

let hashmap1 = hashmap!("foo" => 42, "bar" => 69);

let mut hashmap2 = HashMap::new();
hashmap.insert("foo", 42);
hashmap.insert("bar", 69);

assert_eq(hashmap1, hashmap2);

About

HashMap macro similiar to vec! to get familiar with declarative macros in Rust. Based on https://exercism.org/tracks/rust/exercises/macros

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages