diff --git a/src/libstd/collections/hash/set.rs b/src/libstd/collections/hash/set.rs index 092fb44346848..a038ee8021057 100644 --- a/src/libstd/collections/hash/set.rs +++ b/src/libstd/collections/hash/set.rs @@ -551,7 +551,7 @@ impl HashSet #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub fn union<'a>(&'a self, other: &'a HashSet) -> Union<'a, T, S> { - if self.len() <= other.len() { + if self.len() >= other.len() { Union { iter: self.iter().chain(other.difference(self)), }