You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
They're currently very restricted as they only work with a single iterator type for both arguments, so, e.g. let is_palindrome = order::equals(digits.iter(), digits.iter().rev()); doesn't work.
It should be easy to just add another Iterator<A> parameter for the second argument.
The text was updated successfully, but these errors were encountered:
Closes#14278.
Previously the type signatures of the ordering functions in `core::iter::order` took two iterators, but only if they were the same type of iterator. This commit loosens that restriction and allows different kinds of iterators (but with the same type of elements) to be compared.
They're currently very restricted as they only work with a single iterator type for both arguments, so, e.g.
let is_palindrome = order::equals(digits.iter(), digits.iter().rev());
doesn't work.It should be easy to just add another
Iterator<A>
parameter for the second argument.The text was updated successfully, but these errors were encountered: