Interesting side-note: Rust&#x27;s `HashSet&lt;T&gt;` is actually implemented by wrapping a `HashMap&lt;T, ()&gt;`. But because `()` is zero-sized (unlike a boolean), Rust can optimise a ton of stuff out.