Skip to content

StreamExt::or variant which respects Poll::Ready(None) from stream1 #129

@teohhanhui

Description

@teohhanhui

Stream::poll_next specifies that:

Poll::Ready(None) means that the stream has terminated, and poll_next should not be invoked again.

I understand that this is sometimes intentionally not respected, but I think there should be a variant of StreamExt::or that ends the combined stream when stream1 returns Poll::Ready(None), instead of always falling through to stream2 even when stream1 has ended.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions