8 releases

0.1.7 Jun 30, 2021
0.1.6 Jun 28, 2021

#1345 in Encoding

35 downloads per month

Unlicense

25KB
760 lines

linked-hash-map-rs

Docs

features

serde: impl serde


lib.rs:

#LinkedHashMap

More: [LinkedHashMap] or src/tests.rs


use linked_hash_map_rs::LinkedHashMap;

let mut map = LinkedHashMap::new();
map.insert(1, "a");
map.insert(2, "b");
map.insert(3, "c");
map.get_mut(&1).map(|v| *v = "A");

assert_eq!(map.get(&1), Some(&"A"));
assert_eq!(map.remove(&2), Some((2, "b")));
assert_eq!(map.get(&2), None);
assert_eq!(map.get(&3), Some(&"c"));

Dependencies

~160KB