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

Rename fs::read_string to read_to_string and stabilize #49522

Merged
merged 1 commit into from
Apr 1, 2018

Conversation

mbrubeck
Copy link
Contributor

@mbrubeck mbrubeck commented Mar 30, 2018

As approved in #46588 (comment)

Closes #46588.

@mbrubeck
Copy link
Contributor Author

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.

@XAMPPRocky XAMPPRocky added C-enhancement Category: An issue proposing an enhancement or a PR with one. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Mar 30, 2018
@shepmaster shepmaster added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 30, 2018
@@ -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()?;
Copy link
Contributor

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

Copy link
Contributor Author

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).

Copy link
Contributor

Choose a reason for hiding this comment

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

Alright, sounds good.

@SimonSapin
Copy link
Contributor

@bors: r+

@bors
Copy link
Contributor

bors commented Mar 30, 2018

📌 Commit 6b7627f has been approved by SimonSapin

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 30, 2018
@bors
Copy link
Contributor

bors commented Mar 31, 2018

⌛ Testing commit 6b7627f with merge 8aac708...

bors added a commit that referenced this pull request Mar 31, 2018
Rename fs::read_string to read_to_string and stabilize

As approved in #46588 (comment)

Closes #46588.
@bors
Copy link
Contributor

bors commented Mar 31, 2018

💔 Test failed - status-appveyor

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 31, 2018
@mbrubeck
Copy link
Contributor Author

mbrubeck commented Apr 1, 2018

Hit the three hour limit.

@SimonSapin
Copy link
Contributor

@bors: retry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 1, 2018
@bors
Copy link
Contributor

bors commented Apr 1, 2018

⌛ Testing commit 6b7627f with merge 9ceaa56...

bors added a commit that referenced this pull request Apr 1, 2018
Rename fs::read_string to read_to_string and stabilize

As approved in #46588 (comment)

Closes #46588.
@bors
Copy link
Contributor

bors commented Apr 1, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: SimonSapin
Pushing 9ceaa56 to master...

@bors bors merged commit 6b7627f into rust-lang:master Apr 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants