Skip to content

StreamExt::scan is barely useful due to lifetime issue #2171

@jerry73204

Description

@jerry73204

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 of scan could own the state and returns to stream just like what unfold did . Perhaps we can make this change, or are there any other considerations for this design?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-streamArea: futures::stream

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions