Skip to content

Commit 960f604

Browse files
committed
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`.
2 parents 0e6b713 + f580b98 commit 960f604

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libstd/fs.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -356,9 +356,9 @@ impl File {
356356
/// use std::fs::File;
357357
///
358358
/// fn main() -> std::io::Result<()> {
359-
/// let mut f = File::open("foo.txt")?;
360-
/// # Ok(())
361-
/// # }
359+
/// let mut f = File::open("foo.txt")?;
360+
/// Ok(())
361+
/// }
362362
/// ```
363363
#[stable(feature = "rust1", since = "1.0.0")]
364364
pub fn open<P: AsRef<Path>>(path: P) -> io::Result<File> {

0 commit comments

Comments
 (0)