indexmap
indexmap copied to clipboard
Make IndexSet::intersection() work with stdlib's hashset
There's no reason it shouldn't work with the stdlib hashset. Perhaps we can add a second method for this?
It could work with lots of container types -- anything that has a contains
method. But really, intersection
amounts to just set.iter().filter(|item| other.contains(item))
.
We don't inadvertently want to be responsible for a traitification of set collections, I guess? It's an awkward question.