Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit b9f4350

Browse files
committed
fix doc for UnixStream
1 parent 1f76d21 commit b9f4350

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/std/src/os/unix/net/stream.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,11 +307,11 @@ impl UnixStream {
307307
///
308308
/// ```no_run
309309
/// use std::io;
310-
/// use std::net::UdpSocket;
310+
/// use std::os::unix::net::UnixStream;
311311
/// use std::time::Duration;
312312
///
313313
/// fn main() -> std::io::Result<()> {
314-
/// let socket = UdpSocket::bind("127.0.0.1:34254")?;
314+
/// let socket = UnixStream::connect("/tmp/sock")?;
315315
/// let result = socket.set_write_timeout(Some(Duration::new(0, 0)));
316316
/// let err = result.unwrap_err();
317317
/// assert_eq!(err.kind(), io::ErrorKind::InvalidInput);

0 commit comments

Comments
 (0)