Skip to content

Commit b65c6ec

Browse files
authored
Fix incorrect example code of OpenOptions::open
1 parent 3964a55 commit b65c6ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libstd/fs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,7 @@ impl OpenOptions {
936936
/// ```no_run
937937
/// use std::fs::OpenOptions;
938938
///
939-
/// let file = OpenOptions::new().open("foo.txt");
939+
/// let file = OpenOptions::new().read(true).open("foo.txt");
940940
/// ```
941941
///
942942
/// [`ErrorKind`]: ../io/enum.ErrorKind.html

0 commit comments

Comments
 (0)