fn from(socket_addr: SocketAddr) -> Self {
        Self {
            url: Url::parse(&format!(
                "http://{}",
                match socket_addr {
                    SocketAddr::V4(sa) => format!("{}", sa),
                    SocketAddr::V6(sa) => format!("{}", sa),
                }
            ))
            .expect("can't fail"),
        }
    }
/// Convert SocketAddr to ConnectionEndpoint by assuming that the protocol
/// is always "http". This is consistent with how the --nodes flag in
/// ic-prep handled endpoints.
// TODO(OR4-49): This should eventually be removed, and we shouldn't be
// able to create endpoints without a protocol.
Convert SocketAddr to ConnectionEndpoint by assuming that the protocol
is always "http". This is consistent with how the --nodes flag in
ic-prep handled endpoints.
TODO(OR4-49): This should eventually be removed, and we shouldn't be
able to create endpoints without a protocol.
Convert SocketAddr to ConnectionEndpoint by assuming that the protocol is always " http " . This is consistent with how the -- nodes flag in ic - prep handled endpoints . TODO ( OR4 - 49 ) : This should eventually be removed and we shouldn ' t be able to create endpoints without a protocol .
fn from(socket_addr: SocketAddr) -> Self {
        Self {
            url: Url::parse(&format!(
                "http://{}",
                match socket_addr {
                    SocketAddr::V4(sa) => format!("{}", sa),
                    SocketAddr::V6(sa) => format!("{}", sa),
                }
            ))
            .expect("can't fail"),
        }
    }
fn from ( socket_addr : SocketAddr ) -> Self { Self { url : Url :: parse ( & format ! ( " " match socket_addr { SocketAddr V4 ( sa ) format ( " " sa ) SocketAddr V6 ( sa ) format ( " " sa ) } ) ) . expect ( " " ) , } }
Convert SocketAddr to ConnectionEndpoint by assuming that the protocol
is always "http".
Convert SocketAddr to ConnectionEndpoint by assuming that the protocol is always " http " .
socket_addr
SocketAddr
socket_addr
SocketAddr