Skip to content

Commit

Permalink
Auto merge of #52152 - fabric-and-ink:edit-file-open-example, r=frewsxcv
Browse files Browse the repository at this point in the history
Edit code example for File::open

It looked kinda strange and is now aligned with the other examples for `File`.
  • Loading branch information
bors committed Jul 8, 2018
2 parents 0e6b713 + f580b98 commit 960f604
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/libstd/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down

0 comments on commit 960f604

Please sign in to comment.