Skip to content

Add a function to copy from a Reader to a Writer #19012

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Add a function to copy from a Reader to a Writer #19012

wants to merge 1 commit into from

Conversation

gkoz
Copy link
Contributor

@gkoz gkoz commented Nov 16, 2014

Move copying between streams from io::fs::copy() into a separate fn, adding a NoProgress check from read_at_least.
Initially I wanted to add a write_from_reader() to Writer but it seemed to run afoul of object safety rules.

@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (or someone else) soon.

@ebfe
Copy link
Contributor

ebfe commented Nov 16, 2014

This looks like std::io::util::copy.

@gkoz
Copy link
Contributor Author

gkoz commented Nov 16, 2014

D'oh! :)

@gkoz gkoz closed this Nov 16, 2014
@gkoz
Copy link
Contributor Author

gkoz commented Nov 16, 2014

That one doesn't check for NoProgress though... shouldn't it?

@gkoz gkoz deleted the io_fn_copy branch November 16, 2014 19:48
@ebfe
Copy link
Contributor

ebfe commented Nov 16, 2014

Not sure about that.

lnicola pushed a commit to lnicola/rust that referenced this pull request Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants