We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7e19eef + b9f4350 commit d1763f9Copy full SHA for d1763f9
library/std/src/os/unix/net/stream.rs
@@ -307,11 +307,11 @@ impl UnixStream {
307
///
308
/// ```no_run
309
/// use std::io;
310
- /// use std::net::UdpSocket;
+ /// use std::os::unix::net::UnixStream;
311
/// use std::time::Duration;
312
313
/// fn main() -> std::io::Result<()> {
314
- /// let socket = UdpSocket::bind("127.0.0.1:34254")?;
+ /// let socket = UnixStream::connect("/tmp/sock")?;
315
/// let result = socket.set_write_timeout(Some(Duration::new(0, 0)));
316
/// let err = result.unwrap_err();
317
/// assert_eq!(err.kind(), io::ErrorKind::InvalidInput);
0 commit comments