Add a default impl for Set::is_superset
I also deleted a bunch of documentation that was copy/pasted from the trait definition.
This commit is contained in:
parent
54ec04f1c1
commit
c7325bdd8e
3 changed files with 11 additions and 44 deletions
|
|
@ -88,7 +88,9 @@ pub trait Set<T>: Container {
|
|||
fn is_subset(&self, other: &Self) -> bool;
|
||||
|
||||
/// Return true if the set is a superset of another
|
||||
fn is_superset(&self, other: &Self) -> bool;
|
||||
fn is_superset(&self, other: &Self) -> bool {
|
||||
other.is_subset(self)
|
||||
}
|
||||
|
||||
// FIXME #8154: Add difference, sym. difference, intersection and union iterators
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue