-
Notifications
You must be signed in to change notification settings - Fork 658
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
Implement Extend for Builder #1841
Comments
@tustvold I'm trying to understand the ticket. If I'm not wrong, Example,
given that we have I'm confused because you mentioned |
Yes this is likely a brain fart on my part, the example should already be possible as we implement FromIterator. I think there is still value in implementing Extend, but perhaps less... Edit: It was indeed a brain fart, I've updated the issue to be slightly more coherent. Let me know if you have any questions. |
Thanks @tustvold for the clarification. I started working on the ticket, and opened a draft PR #2038 for you to review to make sure whether I'm on the right direction or not. It adds |
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
The FromIterator trait is a standard trait in the ecosystem for building a collection from an iterator. Supporting it within the builders would allow writing code like (not tested)
Describe the solution you'd like
Implement FromIterator for the Builder types. In most cases FromIterator is implemented for the corresponding Array type, and so it should largely just be a case of moving this logic into the builder and making the array implementation call it.
Describe alternatives you've considered
We could not do this
The text was updated successfully, but these errors were encountered: