StreamExt::scan
is barely useful due to lifetime issue
#2171
Labels
A-stream
Area: futures::stream
Milestone
Continuing #2046, the lifetime issue is still a headache, that the async block basically cannot access the state when it's executed. Currently, I stick to
futures::stream::unfold
workaround to bind streams with states.. IMO, the future block ofscan
could own the state and returns to stream just like whatunfold
did . Perhaps we can make this change, or are there any other considerations for this design?The text was updated successfully, but these errors were encountered: