Skip to content
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

Refs: #2076 implemented async fs::copy #2079

Merged
merged 6 commits into from
Jan 24, 2020
Merged

Refs: #2076 implemented async fs::copy #2079

merged 6 commits into from
Jan 24, 2020

Conversation

DominicWrege
Copy link
Contributor

Motivation

There was no async copy fn. The std lib has one.

Solution

I wrote an async copy fn like the one from std lib.

2076

let to = fs::read("bar.txt").await.unwrap();

assert_eq!(from, to);
assert_eq!(String::from_utf8(from), String::from_utf8(to));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably need to unwrap the results before comparing?

Copy link
Contributor Author

@DominicWrege DominicWrege Jan 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed it

@DominicWrege
Copy link
Contributor Author

Hmm I don't undestand why ci is complaining about bad formatting. I ran cargo fmt.

@carllerche carllerche merged commit f0bfebb into tokio-rs:master Jan 24, 2020
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.

None yet

3 participants