Skip to content

Should stream::Fuse drop the inner stream upon completion? #2510

@erickt

Description

@erickt

I noticed that the implication for future::Fuse will drop the wrapped future when it completes, but stream::Fuse keeps around the stream after it's completed.

Would it make sense to make it drop the value? This would have the advantage of freeing up the interior resources, but it'd be a breaking change since APIs on stream::Fuse that expose the wrapped stream has a few public methods that expose the inner stream. If we ever cut a 0.4, it could be interesting if we switched methods like Fuse::get_ref() to return Option<&St> to allow this optimization.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions