Auto merge of #52152 - fabric-and-ink:edit-file-open-example, r=frewsxcv

Edit code example for File::open

It looked kinda strange and is now aligned with the other examples for `File`.
This commit is contained in:
bors 2018-07-08 16:08:54 +00:00
commit 960f6046c6
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> {