From b65c6ec10fe2b80e22706f5b3245cc5f6f372edf Mon Sep 17 00:00:00 2001 From: Patrick Wang Date: Sat, 14 Dec 2019 03:12:50 +0800 Subject: [PATCH] Fix incorrect example code of OpenOptions::open --- src/libstd/fs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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