Skip to content

Commit ac65470

Browse files
committed
Canonicalize some free functions (1) equal
1 parent 2357d1a commit ac65470

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/lib.rs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3490,17 +3490,7 @@ pub fn equal<I, J>(a: I, b: J) -> bool
34903490
J: IntoIterator,
34913491
I::Item: PartialEq<J::Item>
34923492
{
3493-
let mut ia = a.into_iter();
3494-
let mut ib = b.into_iter();
3495-
loop {
3496-
match ia.next() {
3497-
Some(x) => match ib.next() {
3498-
Some(y) => if x != y { return false; },
3499-
None => return false,
3500-
},
3501-
None => return ib.next().is_none()
3502-
}
3503-
}
3493+
a.into_iter().eq(b)
35043494
}
35053495

35063496
/// Assert that two iterables produce equal sequences, with the same

0 commit comments

Comments
 (0)