Skip to content

std::io::copy should take Read and Write traits by value #105643

Description

@est31

This was suggested by @alexcrichton way back in 2015:

mod std::io {
    fn copy<R: Read, W: Write>(r: R, w: W) -> io::Result<u64> { ... }
}

but it wasn't done as it regressed 3 (root) crates in a crater run. Still, ideally if the API breakage policy is ever revisited, it would be better to take Read and Write by-value, as a type impl'ing Read transmits this property to &mut references of it.

@rustbot label T-libs-api rust-2-breakage-wishlist

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-libs-api[DEPRECATED; DO NOT USE]disposition-closeThis PR / issue is in PFCP or FCP with a disposition to close it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions