Fix incorrect example code of OpenOptions::open

This commit is contained in:
Patrick Wang 2019-12-14 03:12:50 +08:00 committed by GitHub
parent 3964a55ba5
commit b65c6ec10f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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