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

use top level fs functions where appropriate #56258

Merged
merged 1 commit into from
Dec 8, 2018

Commits on Dec 7, 2018

  1. use top level fs functions where appropriate

    This commit replaces many usages of `File::open` and reading or writing
    with `fs::read_to_string`, `fs::read` and `fs::write`. This reduces code
    complexity, and will improve performance for most reads, since the
    functions allocate the buffer to be the size of the file.
    
    I believe that this commit will not impact behavior in any way, so some
    matches will check the error kind in case the file was not valid UTF-8.
    Some of these cases may not actually care about the error.
    euclio committed Dec 7, 2018
    Configuration menu
    Copy the full SHA
    2f62265 View commit details
    Browse the repository at this point in the history