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

Reword OpenOptions::{create, create_new} doc. #69284

Merged
merged 1 commit into from
Feb 19, 2020

Conversation

jumbatm
Copy link
Contributor

@jumbatm jumbatm commented Feb 19, 2020

Closes #69254.

Currently, the doc comment for fs::OpenOptions::create doesn't mention its behaviour when opening an existing file, and fs::OpenOptions::create_new's doc comment is worded in a way that doesn't make it clear that it actually fails if the file already exists, not overwrite the existing file with a new one.

This PR addresses addresses this by rewording the doc comments to be more explicit.

r? @GuillaumeGomez

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 19, 2020
src/libstd/fs.rs Show resolved Hide resolved
@Dylan-DPC-zz
Copy link

r? @Dylan-DPC

@Dylan-DPC-zz
Copy link

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Feb 19, 2020

📌 Commit c899dc1 has been approved by Dylan-DPC

@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 Feb 19, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Feb 19, 2020
…ylan-DPC

Reword OpenOptions::{create, create_new} doc.

Closes rust-lang#69254.

Currently, the doc comment for `fs::OpenOptions::create` doesn't mention its behaviour when opening an existing file, and `fs::OpenOptions::create_new`'s doc comment is worded in a way that doesn't make it clear that it actually _fails_ if the file already exists, not overwrite the existing file with a new one.

This PR addresses addresses this by rewording the doc comments to be more explicit.

r? @GuillaumeGomez
This was referenced Feb 19, 2020
bors added a commit that referenced this pull request Feb 19, 2020
Rollup of 5 pull requests

Successful merges:

 - #68863 (ci: switch macOS builders to 10.15)
 - #69142 (Add shared script for linkchecking books.)
 - #69248 (Don't eliminate frame pointers on thumb targets)
 - #69280 (Remove special case for `simd_shuffle` arg promotion)
 - #69284 (Reword OpenOptions::{create, create_new} doc.)

Failed merges:

r? @ghost
@bors bors merged commit a97f354 into rust-lang:master Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OpenOptions: create() and create_new() are flip flopped
6 participants