diff options
| author | bors <bors@rust-lang.org> | 2018-07-08 16:08:54 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-07-08 16:08:54 +0000 |
| commit | 960f6046c6d367a48f405dd5c76cc303497edfc5 (patch) | |
| tree | 598f4892950afc50460c4a590e2f30f17b99686a | |
| parent | 0e6b713dd51e07e7c38ed0fe3f1273e648bfd056 (diff) | |
| parent | f580b983b1a35cfb0d25b56c5b201ebdbc39636c (diff) | |
| download | rust-960f6046c6d367a48f405dd5c76cc303497edfc5.tar.gz rust-960f6046c6d367a48f405dd5c76cc303497edfc5.zip | |
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`.
| -rw-r--r-- | src/libstd/fs.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs index 987687ea8e8..7632fbc41f5 100644 --- a/src/libstd/fs.rs +++ b/src/libstd/fs.rs @@ -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> { |
