about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorSteven Fackler <sfackler@gmail.com>2014-04-13 20:22:58 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-04-15 19:45:00 -0700
commitc7325bdd8e29d57e7bc971b86accfb352c4262bc (patch)
tree320b3c23ef713d787533b24f71a3d617bd8882ae /src/libstd
parent54ec04f1c12c7fb4dbe5f01fdeb73d1079fef53d (diff)
downloadrust-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.rs4
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
 }