Skip to content

Should SinkExt::send_all take stream by value #2214

@taiki-e

Description

@taiki-e

send_all exhausts given stream, so it's probably ok to consume stream. This allows removing the stream's Unpin requirement. Also, since &mut impl Stream + Unpin implements Stream, code using the current version will also work.

It will complete once both the stream is exhausted, the sink has received all items, and the sink has been flushed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions