-
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
Tracking issue for std::fs::read, read_string, and write #46588
Comments
Implemented, so shouldn't this be closed? |
@JordiPolo this issue is tracking their stabilization, not their implementation. |
By the way, is there a delay before we should start FCP for stabilization? This is niche enough that I don’t expect to get more feedback just by waiting. I’m not planning to use these functions myself until they’re stable. |
Is also adding a lazy iterator on lines a good idea? |
@leonardo-m https://doc.rust-lang.org/std/io/trait.BufRead.html#method.lines already exists. Or do you mean adding a convenience function that calls it from a filename? I personally feel less need for that function, but feel free to open a new PR for it. |
I meant a convenience function. It's often useful for small script-like programs, tests, benchmarks, online code competitions and games, etc. |
@aturon Let’s stabilize? |
@rfcbot fcp merge |
Team member @sfackler has proposed to merge this. The next step is review by the rest of the tagged teams: No concerns currently listed. Once a majority of reviewers approve (and none object), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
This landed less than a month ago, right? Is that a bit rapid for stabilization? |
Why |
I would expect something named |
@alexcrichton assuming we don't land a PR for this cycle, it's another 3 months away from hitting stable. |
@aturon that's true yeah, if we land on the next nightly (which branches Feb 15) I think that's an ok length of time. |
@dtolnay That's interesting. I don't think that is connected to to because To me, |
Previous discussion on the naming of |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
It seems like there was a lot of discussion about
Is there any chance of changing the function to |
@rfcbot concern read_string Registering that I meant to be blocking on the name I'd really like this to be stabilized. I think |
I don’t have a strong opinion for the name of this function, but the |
I think if they were differentiating themselves from some other "default" read mode, then those would be reasonable names. Since we default to bytes, I'd say they don't need to differentiate? I'm not sure I think 👍 for either |
The final comment period is now complete. |
I would be happy with The one issue with |
How about |
In |
It seems like the naming for the string-returning function isn't super resolved, so how about stabilizing just |
@sfackler sounds good to me :) |
|
@angusholder There is no deadline for stabilizations. The only thing time-based things are release trains, https://forge.rust-lang.org/#release_info shows some dates. When a version reaches Stable, the next one graduates from Nightly to Beta at the same time and then reaches Stable 6 weeks later. At this point I have no opinion about naming for this function. I’ll let @withoutboats pick one and resolve their concern with rfcbot. |
looking forward to this being stabilized :) |
Stabilize fs::read and fs::write As discussed in #46588 (comment)
The libs team discussed this today and the consensus is to stabilize with the |
Rename fs::read_string to read_to_string and stabilize As approved in #46588 (comment) Closes #46588.
Rename fs::read_string to read_to_string and stabilize As approved in #46588 (comment) Closes #46588.
Implemented in #45837
New APIs in
std::fs
:(
read_string
is based onread_to_string
and so returns an error on non-UTF-8 content.)Before:
After:
The text was updated successfully, but these errors were encountered: