Skip to content

Commit d9f58d4

Browse files
committed
This optimization can't be applied to {partial_}cmp{_by}
1 parent 4064a6b commit d9f58d4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/core/src/iter/traits/iterator.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3616,7 +3616,7 @@ pub trait Iterator {
36163616
}
36173617
}
36183618

3619-
match SpecIterCompare::spec_iter_compare(self, other.into_iter(), compare(cmp)) {
3619+
match iter_compare(self, other.into_iter(), compare(cmp)) {
36203620
ControlFlow::Continue(ord) => ord,
36213621
ControlFlow::Break(ord) => ord,
36223622
}
@@ -3708,7 +3708,7 @@ pub trait Iterator {
37083708
}
37093709
}
37103710

3711-
match SpecIterCompare::spec_iter_compare(self, other.into_iter(), compare(partial_cmp)) {
3711+
match iter_compare(self, other.into_iter(), compare(partial_cmp)) {
37123712
ControlFlow::Continue(ord) => Some(ord),
37133713
ControlFlow::Break(ord) => ord,
37143714
}

0 commit comments

Comments
 (0)