by aweinstock · 10y ago · 0 comments
They use Clone to construct a new set for the result, for use with a functional style. There are also the union/intersection methods that produce lazy iterators over references to the values in the sets, for cases where cloning the set elements would be too big a runtime price, at a slight cost to ergonomics.
Clone-based operator overloading:
https://doc.rust-lang.org/std/collections/struct.HashSet.htm...
https://doc.rust-lang.org/std/collections/struct.HashSet.htm...
Lazy-iterator-based methods:
https://doc.rust-lang.org/std/collections/struct.HashSet.htm...
https://doc.rust-lang.org/std/collections/struct.HashSet.htm...
Do these qualify as reasonable set operations?
No comments yet.