Rollup merge of #67282 - pjw91:patch-1, r=Dylan-DPC
Fix example code of OpenOptions::open The example didn't set the access mode flag, which resulted in an `Err(InvalidInput)`. r? @steveklabnik
This commit is contained in:
commit
541dc62d64
1 changed files with 1 additions and 1 deletions
|
|
@ -936,7 +936,7 @@ impl OpenOptions {
|
|||
/// ```no_run
|
||||
/// use std::fs::OpenOptions;
|
||||
///
|
||||
/// let file = OpenOptions::new().open("foo.txt");
|
||||
/// let file = OpenOptions::new().read(true).open("foo.txt");
|
||||
/// ```
|
||||
///
|
||||
/// [`ErrorKind`]: ../io/enum.ErrorKind.html
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue