Skip to content

Commit aaf2519

Browse files
committed
Updating fs::read example to remove SocketAddress
1 parent 4f7baf7 commit aaf2519

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/std/src/fs.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -242,10 +242,10 @@ pub struct DirBuilder {
242242
///
243243
/// ```no_run
244244
/// use std::fs;
245-
/// use std::net::SocketAddr;
246245
///
247246
/// fn main() -> Result<(), Box<dyn std::error::Error + 'static>> {
248-
/// let foo: SocketAddr = String::from_utf8_lossy(&fs::read("address.txt")?).parse()?;
247+
/// let address: String = String::from_utf8_lossy(&fs::read("address.txt")?).to_string();
248+
/// println!("{}", address);
249249
/// Ok(())
250250
/// }
251251
/// ```

0 commit comments

Comments
 (0)