Skip to content

Commit d1763f9

Browse files
authored
Unrolled build for rust-lang#140984
Rollup merge of rust-lang#140984 - mlowicki:patch-2, r=ibraheemdev fix doc for UnixStream Doc example was using `UdpSocket` instead of `UnixStream`.
2 parents 7e19eef + b9f4350 commit d1763f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

+2-2
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)