diff options
| author | blake2-ppc <blake2-ppc> | 2013-07-31 21:07:45 +0200 |
|---|---|---|
| committer | blake2-ppc <blake2-ppc> | 2013-08-01 16:54:22 +0200 |
| commit | e5a64f2adddd1ed2ec8e92ec94658b24ece4dbfc (patch) | |
| tree | ea0b6a6b2377a28f127ae2e583f9b795e3cf08a7 /src/libstd/hashmap.rs | |
| parent | 310e0b6e92e2a5c48a96a0b5c0951d77e402dd75 (diff) | |
| download | rust-e5a64f2adddd1ed2ec8e92ec94658b24ece4dbfc.tar.gz rust-e5a64f2adddd1ed2ec8e92ec94658b24ece4dbfc.zip | |
std: Remove the internal iterator methods from trait Set
.intersection(), .union() etc methods in trait std::container::Set use internal iters. Remove these methods from the trait. I reported issue #8154 for the reinstatement of iterator-based set algebra methods to the Set trait. For bitv and treemap, that lack Iterator implementations of set operations, preserve them as methods directly on the types themselves. For HashSet, these methods are replaced by the present .union_iter() etc.
Diffstat (limited to 'src/libstd/hashmap.rs')
| -rw-r--r-- | src/libstd/hashmap.rs | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/libstd/hashmap.rs b/src/libstd/hashmap.rs index 8c06f23b8c1..ca61f3e5ad8 100644 --- a/src/libstd/hashmap.rs +++ b/src/libstd/hashmap.rs @@ -672,28 +672,6 @@ impl<T:Hash + Eq> Set<T> for HashSet<T> { fn is_superset(&self, other: &HashSet<T>) -> bool { other.is_subset(self) } - - /// Visit the values representing the difference - fn difference(&self, other: &HashSet<T>, f: &fn(&T) -> bool) -> bool { - self.difference_iter(other).advance(f) - } - - /// Visit the values representing the symmetric difference - fn symmetric_difference(&self, - other: &HashSet<T>, - f: &fn(&T) -> bool) -> bool { - self.symmetric_difference_iter(other).advance(f) - } - - /// Visit the values representing the intersection - fn intersection(&self, other: &HashSet<T>, f: &fn(&T) -> bool) -> bool { - self.intersection_iter(other).advance(f) - } - - /// Visit the values representing the union - fn union(&self, other: &HashSet<T>, f: &fn(&T) -> bool) -> bool { - self.union_iter(other).advance(f) - } } impl<T:Hash + Eq> MutableSet<T> for HashSet<T> { |
