HashByRef
This is a small helper crate to use Rc<T>
as hash keys where equality is supposed to be determined by the underlaying
reference identity (i.e. by the value of the pointer). It provides a type HashByRef<T>
that can be used as key in the hashmap.
Quick Start
hash_by_ref = "0.1.0"
use HashMap;
use Rc;
use HashByRef;
let r1 = new;
let r2 = new;
let r3 = r1.clone;
let mut h = new;
h.insert;
h.insert;
assert_eq!;
assert_eq!;
assert_eq!;