You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
OpenOptions: create() and create_new() are flip flopped #69254
This code creates a file only if the file does not exist
But look at the docs
For create()
For create_new()
I expected to see this happen: explanation
The functions to match their docs
Instead, this happened: explanation
They each do what the other is described to do
Activity
jumbatm commentedon Feb 18, 2020
This appears to be a doc issue, not a library bug.
In RFC 1252
expand_open_options, it sayscreateshould open an existing file, or create a new file if it does not already exist, andcreate_newshould open a new file, failing if it doesn't exist, which is consistent with the observed behaviour. I believe the current wording is a bit ambiguous, though.cc @pitdicker
@rustbot modify labels to +T-doc
Rollup merge of rust-lang#69284 - jumbatm:openoptions-create-doc, r=D…
Rollup merge of rust-lang#69284 - jumbatm:openoptions-create-doc, r=D…