Implement stream::cycle(..)#388
Implement stream::cycle(..)#388yoshuawuyts merged 18 commits intoasync-rs:masterfrom felipesere:cycle
Conversation
k-nasa
left a comment
There was a problem hiding this comment.
I'm sorry if it is an extra opinion.
yoshuawuyts
left a comment
There was a problem hiding this comment.
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 <yoshuawuyts+github@gmail.com>
This reverts commit e9b9284.
|
@yoshuawuyts anything I should still do on this? :) |
yoshuawuyts
left a comment
There was a problem hiding this comment.
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