diff options
| author | Fabian Drinck <fabian.drinck@rwth-aachen.de> | 2018-07-08 16:07:09 +0200 |
|---|---|---|
| committer | Fabian Drinck <fabian.drinck@rwth-aachen.de> | 2018-07-08 16:07:09 +0200 |
| commit | f580b983b1a35cfb0d25b56c5b201ebdbc39636c (patch) | |
| tree | 46e9869a9a584d5585d7c32df33f3037bf53dd20 /src/libstd | |
| parent | 0c0315cfd9750db7793b83bc59dfd353c5dd1624 (diff) | |
| download | rust-f580b983b1a35cfb0d25b56c5b201ebdbc39636c.tar.gz rust-f580b983b1a35cfb0d25b56c5b201ebdbc39636c.zip | |
Edit code example for File::open
Diffstat (limited to 'src/libstd')
| -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> { |
