-
Notifications
You must be signed in to change notification settings - Fork 341
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 stream::cycle(..) #388
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry if it is an extra opinion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for this patch! -- @k-nasa's feedback is on point, and some of the API would need to change before we can merge this. This is heading in the right direction though, and thanks so much for working on this!
@yoshuawuyts The bounds are adjusted and we take as Stream as argument. What API changes do you have in mind? Should I attach it to stream itself so once can write
|
@felipesere yes, that's exactly what I was hoping you'd say! -- this should indeed be a method on |
@yoshuawuyts I've moved it, but I think clippy is unhappy on CI and not in a mood to run? 😃 |
@k-nasa @yoshuawuyts anything else to add? 😅 |
Co-Authored-By: Yoshua Wuyts <[email protected]>
This reverts commit e9b9284.
@yoshuawuyts anything I should still do on this? :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, thank you!
This is a rough initial step that is able to take a vec and cycle it indefinitly.
I saw there were comments on #34 about the API and using
IntoStream
.Would I have to impl IntoStream for a
Vec<T>
myself to be able to have the example be liek below?I'm happy to get some pointers and see this through :)
Ref: #129