3 ms·
Rust's HashSet is a HashMap mapping to "()", which is Rust's equivalent to "void".
by alpaca128 3y ago
Rust's HashSet is a HashMap mapping to "()", which is Rust's equivalent to "void".
- progbits 3y agoThat is true for the internal implementation details but HashSet provides a different API, it is not just a type alias. So you don't have to worry about semantics of what the values mean (like the bools in Go), and it has no size overhead.