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

Add Into impl for std::fs::File #38

Merged
merged 1 commit into from
Feb 19, 2022

Conversation

Nukesor
Copy link
Contributor

@Nukesor Nukesor commented Feb 19, 2022

This adds the .into() and .from() traits to easily convert a fs_err::File into an std::fs::File.

Calling file.into() is quite a bit more intuitive and elegant than calling file.into_parts().0.
This especially useful when using fs-err in libraries if one doesn't want to expose the fs-err::File type.

Copy link
Owner

@andrewhickman andrewhickman left a comment

Choose a reason for hiding this comment

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

Looks like a reasonable addition, thanks!

@andrewhickman andrewhickman merged commit b899e57 into andrewhickman:master Feb 19, 2022
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.

2 participants