diff options
| author | Michał Łowicki <michal.lowicki@datadoghq.com> | 2025-05-13 22:00:56 -0400 |
|---|---|---|
| committer | Michał Łowicki <michal.lowicki@datadoghq.com> | 2025-05-13 22:00:56 -0400 |
| commit | b9f4350fbc8198f4805557d9b0c5367ebc2390d2 (patch) | |
| tree | 85216e8f1cf31c006d7e65982357aabf36580296 /library | |
| parent | 1f76d219c906f0112bb1872f33aa977164c53fa6 (diff) | |
| download | rust-b9f4350fbc8198f4805557d9b0c5367ebc2390d2.tar.gz rust-b9f4350fbc8198f4805557d9b0c5367ebc2390d2.zip | |
fix doc for UnixStream
Diffstat (limited to 'library')
| -rw-r--r-- | library/std/src/os/unix/net/stream.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/os/unix/net/stream.rs b/library/std/src/os/unix/net/stream.rs index 1cab04a454d..1bd3bab5e37 100644 --- a/library/std/src/os/unix/net/stream.rs +++ b/library/std/src/os/unix/net/stream.rs @@ -307,11 +307,11 @@ impl UnixStream { /// /// ```no_run /// use std::io; - /// use std::net::UdpSocket; + /// use std::os::unix::net::UnixStream; /// use std::time::Duration; /// /// fn main() -> std::io::Result<()> { - /// let socket = UdpSocket::bind("127.0.0.1:34254")?; + /// let socket = UnixStream::connect("/tmp/sock")?; /// let result = socket.set_write_timeout(Some(Duration::new(0, 0))); /// let err = result.unwrap_err(); /// assert_eq!(err.kind(), io::ErrorKind::InvalidInput); |
