Skip to content

Commit f580b98

Browse files
Edit code example for File::open
1 parent 0c0315c commit f580b98

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)