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

Switch to std::fs::read_to_string #1906

Merged
merged 1 commit into from
Jun 24, 2019

Conversation

tesuji
Copy link
Contributor

@tesuji tesuji commented Jun 21, 2019

According to the doc: it is generally faster than reading into a string created with String::new().

Copy link
Contributor

@kinnison kinnison left a comment

Choose a reason for hiding this comment

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

While I question the wisdom of needing to improve performance on any of these pathways, I do agree that it simplifies the codebase by removing two implementations of what is essentially something from std

@kinnison
Copy link
Contributor

I think the test failures are windows being odd. But I'd like @rbtcollins to confirm before merging.

@tesuji tesuji changed the title Switch to the std::fs::read_to_string Switch to std::fs::read_to_string Jun 21, 2019
Copy link
Contributor

@rbtcollins rbtcollins left a comment

Choose a reason for hiding this comment

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

LGTM

@rbtcollins
Copy link
Contributor

The CI failures I haven't investigated, but I see no platform interactions to be concerned about.

@kinnison kinnison merged commit 4514881 into rust-lang:master Jun 24, 2019
@tesuji tesuji deleted the fs-read-to-string branch June 24, 2019 10:34
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.

3 participants