Skip to content

The functions in core::iter::order should accept different iterator types #14278

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
huonw opened this issue May 18, 2014 · 0 comments · Fixed by #14289
Closed

The functions in core::iter::order should accept different iterator types #14278

huonw opened this issue May 18, 2014 · 0 comments · Fixed by #14289
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@huonw
Copy link
Member

huonw commented May 18, 2014

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.

bors added a commit that referenced this issue May 20, 2014
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant