From c7325bdd8e29d57e7bc971b86accfb352c4262bc Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Sun, 13 Apr 2014 20:22:58 -0700 Subject: Add a default impl for Set::is_superset I also deleted a bunch of documentation that was copy/pasted from the trait definition. --- src/libstd/container.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/libstd') 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: 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 } -- cgit 1.4.1-3-g733a5