Skip to content
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

Accept any IntoIterator in choose_multiple #92

Merged
merged 1 commit into from
Nov 17, 2024

Conversation

tranzystorekk
Copy link
Contributor

Accepting only Iterators needlessly constrains the API (case in point, the clunky example with vec![...].iter() where a simple array would suffice).

Shouldn't be a breaking change since all Iterators are no-op IntoIterators.

@tranzystorekk tranzystorekk force-pushed the choose-intoiter branch 2 times, most recently from bccecb2 to 33d568f Compare October 26, 2024 10:07
@notgull
Copy link
Member

notgull commented Nov 8, 2024

Isn't this a breaking change?

@tranzystorekk
Copy link
Contributor Author

Only apparently, all iterators automatically implement IntoIterator.

@notgull
Copy link
Member

notgull commented Nov 16, 2024

@taiki-e My gut is telling me there is a subtlety here I'm missing, any insights here?

@taiki-e
Copy link
Collaborator

taiki-e commented Nov 17, 2024

There is a possibility of ambiguity regarding type inference, but this is considered a minor change. See RFC1105 for more.

Copy link
Member

@notgull notgull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, that was my only issue.

@notgull notgull merged commit a69b481 into smol-rs:master Nov 17, 2024
14 checks passed
@tranzystorekk tranzystorekk deleted the choose-intoiter branch November 17, 2024 19:08
@notgull notgull mentioned this pull request Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants