diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-12-15 05:57:24 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-12-15 05:57:24 +0100 |
| commit | 541dc62d64345bb64e16ade2d0e485144b664dfd (patch) | |
| tree | 4a4f8ff9b70d8670aa09f04d02b3190207d90f52 /src/libstd/fs.rs | |
| parent | 39c5d8199aa5cf049585a3a458c590c6a4d4a6ca (diff) | |
| parent | b65c6ec10fe2b80e22706f5b3245cc5f6f372edf (diff) | |
| download | rust-541dc62d64345bb64e16ade2d0e485144b664dfd.tar.gz rust-541dc62d64345bb64e16ade2d0e485144b664dfd.zip | |
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
Diffstat (limited to 'src/libstd/fs.rs')
| -rw-r--r-- | src/libstd/fs.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs index a109e38e1e3..01e57ec0ab9 100644 --- a/src/libstd/fs.rs +++ b/src/libstd/fs.rs @@ -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 |
