diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs index 4310e10830380..cd7b7ccd99ebb 100644 --- a/library/std/src/fs.rs +++ b/library/std/src/fs.rs @@ -283,11 +283,11 @@ pub fn read>(path: P) -> io::Result> { /// /// ```no_run /// use std::fs; -/// use std::net::SocketAddr; /// use std::error::Error; /// /// fn main() -> Result<(), Box> { -/// let foo: SocketAddr = fs::read_to_string("address.txt")?.parse()?; +/// let address: String = fs::read_to_string("address.txt")?.parse()?; +/// println!("{}", address); /// Ok(()) /// } /// ```