mirror of https://github.com/rust-lang/rust.git
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`.
This commit is contained in:
commit
960f6046c6
|
@ -356,9 +356,9 @@ impl File {
|
||||||
/// use std::fs::File;
|
/// use std::fs::File;
|
||||||
///
|
///
|
||||||
/// fn main() -> std::io::Result<()> {
|
/// fn main() -> std::io::Result<()> {
|
||||||
/// let mut f = File::open("foo.txt")?;
|
/// let mut f = File::open("foo.txt")?;
|
||||||
/// # Ok(())
|
/// Ok(())
|
||||||
/// # }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
pub fn open<P: AsRef<Path>>(path: P) -> io::Result<File> {
|
pub fn open<P: AsRef<Path>>(path: P) -> io::Result<File> {
|
||||||
|
|
Loading…
Reference in New Issue