Skip to content

Commit

Permalink
Updating fs::read example to remove SocketAddress
Browse files Browse the repository at this point in the history
  • Loading branch information
haydonryan committed Dec 11, 2023
1 parent 4f7baf7 commit aaf2519
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/std/src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,10 @@ pub struct DirBuilder {
///
/// ```no_run
/// use std::fs;
/// use std::net::SocketAddr;
///
/// fn main() -> Result<(), Box<dyn std::error::Error + 'static>> {
/// let foo: SocketAddr = String::from_utf8_lossy(&fs::read("address.txt")?).parse()?;
/// let address: String = String::from_utf8_lossy(&fs::read("address.txt")?).to_string();
/// println!("{}", address);
/// Ok(())
/// }
/// ```
Expand Down

0 comments on commit aaf2519

Please sign in to comment.