diff options
| author | Steven Fackler <sfackler@gmail.com> | 2014-04-13 20:22:58 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-04-15 19:45:00 -0700 |
| commit | c7325bdd8e29d57e7bc971b86accfb352c4262bc (patch) | |
| tree | 320b3c23ef713d787533b24f71a3d617bd8882ae /src/libstd | |
| parent | 54ec04f1c12c7fb4dbe5f01fdeb73d1079fef53d (diff) | |
| download | rust-c7325bdd8e29d57e7bc971b86accfb352c4262bc.tar.gz rust-c7325bdd8e29d57e7bc971b86accfb352c4262bc.zip | |
Add a default impl for Set::is_superset
I also deleted a bunch of documentation that was copy/pasted from the trait definition.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/container.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libstd/container.rs b/src/libstd/container.rs index 326b9fa3d33..e8ee3792dcf 100644 --- a/src/libstd/container.rs +++ b/src/libstd/container.rs @@ -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 } |
