You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would also be nice to be able to pass in the hash/eq fns using ifaces, like:
// somewhere in core
iface eq { fn eq (a: self) -> bool; }
iface hash { fn hash () -> uint; }
// a set module constructor
fn mk_set <V:eq hash copy> () -> set<V> { ... }
// to construct a set of some type with eq and hash in scope:
let s = set::mk_set();
s.insert(...);
Actually the same thing would be nice for maps, too.
There's code in rustc that represents sets as hash maps with value type
()
, and that's a little hokey. Sets should be in the standard library.The text was updated successfully, but these errors were encountered: