Canonicalize some free functions (1) equal
@@ -3490,17 +3490,7 @@ pub fn equal<I, J>(a: I, b: J) -> bool
J: IntoIterator,
I::Item: PartialEq<J::Item>
{
- let mut ia = a.into_iter();
- let mut ib = b.into_iter();
- loop {
- match ia.next() {
- Some(x) => match ib.next() {
- Some(y) => if x != y { return false; },
- None => return false,
- },
- None => return ib.next().is_none()
- }
- }
+ a.into_iter().eq(b)
}
/// Assert that two iterables produce equal sequences, with the same
