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:
Steven Fackler 2014-04-13 20:22:58 -07:00 committed by Alex Crichton
parent 54ec04f1c1
commit c7325bdd8e
3 changed files with 11 additions and 44 deletions

View file

@ -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
}