diff options
| author | Adam Harvey <adam@adamharvey.name> | 2025-09-24 15:56:38 -0700 |
|---|---|---|
| committer | Adam Harvey <adam@adamharvey.name> | 2025-09-24 15:56:38 -0700 |
| commit | 852da23a2d06de5a7821b1fdb356fe3a410b2d00 (patch) | |
| tree | 8808aa8a95cefa142af641655d1642fd1c6ca4d5 | |
| parent | caccb4d0368bd918ef6668af8e13834d07040417 (diff) | |
| download | rust-852da23a2d06de5a7821b1fdb356fe3a410b2d00.tar.gz rust-852da23a2d06de5a7821b1fdb356fe3a410b2d00.zip | |
Explicitly note `&[SocketAddr]` impl of `ToSocketAddrs`.
Although the examples below this list do imply that there's an impl of `ToSocketAddrs` for `&[SocketAddr]`, it's not actually noted in the list of default implementations.
| -rw-r--r-- | library/std/src/net/socket_addr.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/std/src/net/socket_addr.rs b/library/std/src/net/socket_addr.rs index 5b56dd3f744..8214ad381f1 100644 --- a/library/std/src/net/socket_addr.rs +++ b/library/std/src/net/socket_addr.rs @@ -28,6 +28,8 @@ use crate::{io, iter, option, slice, vec}; /// [`SocketAddr`] as expected by its [`FromStr`] implementation or a string like /// `<host_name>:<port>` pair where `<port>` is a [`u16`] value. /// +/// * <code>&[[SocketAddr]]</code>: all [`SocketAddr`] values in the slice will be used. +/// /// This trait allows constructing network objects like [`TcpStream`] or /// [`UdpSocket`] easily with values of various types for the bind/connection /// address. It is needed because sometimes one type is more appropriate than |
