]> git.lizzy.rs Git - rust.git/commitdiff
Edit code example for File::open
authorFabian Drinck <fabian.drinck@rwth-aachen.de>
Sun, 8 Jul 2018 14:07:09 +0000 (16:07 +0200)
committerFabian Drinck <fabian.drinck@rwth-aachen.de>
Sun, 8 Jul 2018 14:07:09 +0000 (16:07 +0200)
src/libstd/fs.rs

index 987687ea8e865b7acbe575ddceedc5c07b16aaa6..7632fbc41f5a322e64fe0ddfca7050178ce94e22 100644 (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> {