-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Rename fs::read_string to read_to_string and stabilize #49522
Conversation
Set the stabilization attribute to 1.26.0 because it hasn't branched to beta yet. It will need to be updated if the branch happens before this lands. |
@@ -244,7 +244,8 @@ fn get_resident() -> Option<usize> { | |||
use std::fs; | |||
|
|||
let field = 1; | |||
let contents = fs::read_string("/proc/self/statm").ok()?; | |||
let contents = fs::read("/proc/self/statm").ok()?; | |||
let contents = String::from_utf8(contents).ok()?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change? Other than this r=me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the new read_to_string
function here would break bootstrapping from the previous release, where that name didn't exist. This seemed simpler than doing some sort of conditional import based on cfg(stage0).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, sounds good.
@bors: r+ |
📌 Commit 6b7627f has been approved by |
Rename fs::read_string to read_to_string and stabilize As approved in #46588 (comment) Closes #46588.
💔 Test failed - status-appveyor |
Hit the three hour limit. |
@bors: retry |
Rename fs::read_string to read_to_string and stabilize As approved in #46588 (comment) Closes #46588.
☀️ Test successful - status-appveyor, status-travis |
As approved in #46588 (comment)
Closes #46588.