Edit code example for File::open

This commit is contained in:
Fabian Drinck 2018-07-08 16:07:09 +02:00
parent 0c0315cfd9
commit f580b983b1
1 changed files with 3 additions and 3 deletions

View File

@ -356,9 +356,9 @@ impl File {
/// use std::fs::File;
///
/// fn main() -> std::io::Result<()> {
/// let mut f = File::open("foo.txt")?;
/// # Ok(())
/// # }
/// let mut f = File::open("foo.txt")?;
/// Ok(())
/// }
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
pub fn open<P: AsRef<Path>>(path: P) -> io::Result<File> {