You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found myself writing a generator for an impl IntoIterator type---I had originally used impl Generator before realizing that it wasn't what I wanted because I wanted synchronous usage only. But in theory there's no reason not to expose in my API that the same result could be used as an async Generator. So perhaps there should be a convenience trait that implements both?
Because a concrete Gen can't be swapped out as easily. Though I guess if
standard generators make it out, I will need to change the interfaces, so
maybe it's not worth.
I found myself writing a generator for an
impl IntoIterator
type---I had originally usedimpl Generator
before realizing that it wasn't what I wanted because I wanted synchronous usage only. But in theory there's no reason not to expose in my API that the same result could be used as an asyncGenerator
. So perhaps there should be a convenience trait that implements both?The text was updated successfully, but these errors were encountered: