smolmap

Crates.iosmolmap
lib.rssmolmap
version0.1.0-alpha.0
sourcesrc
created_at2023-06-16 18:38:56.331591
updated_at2023-06-16 18:38:56.331591
descriptionA hashmap on the stack.
homepage
repositoryhttps://github.com/edg-l/smolmap
max_upload_size
id892510
size42,335
Edgar (edg-l)

documentation

https://docs.rs/smolmap

README

smolmap

A hashmap on the stack in Rust, for fun, not really a serious project for now.

let mut map: SmolMap<u32, u32, 4> = SmolMap::new(RandomState::new());
map.insert(1, 3);
map.insert(2, 2);
map.insert(3, 1);
assert_eq!(map.get(&1), Some(&3));
assert_eq!(map.get(&2), Some(&2));
assert_eq!(map.get(&3), Some(&1));
assert_eq!(map.get(&6), None);
Commit count: 5

cargo fmt