diff options
| author | Patrick Wang <mail6543210@yahoo.com.tw> | 2019-12-14 03:12:50 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-12-14 03:12:50 +0800 |
| commit | b65c6ec10fe2b80e22706f5b3245cc5f6f372edf (patch) | |
| tree | e9922114ce87bdb20d90b1df83dbe03213d27b6b /src/libstd | |
| parent | 3964a55ba59bb6c3d4badcbddc49f6929ef76862 (diff) | |
| download | rust-b65c6ec10fe2b80e22706f5b3245cc5f6f372edf.tar.gz rust-b65c6ec10fe2b80e22706f5b3245cc5f6f372edf.zip | |
Fix incorrect example code of OpenOptions::open
Diffstat (limited to 'src/libstd')
| -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 |
