rust/library/std/src/net
Tyler Mandry 5b61230303
Rollup merge of #74409 - LukasKalbertodt:improve-debug-impl-of-socketaddr-ipaddr, r=Amanieu
Change Debug impl of SocketAddr and IpAddr to match their Display output

This has already been done for `SocketAddrV4`, `SocketAddrV6`, `IpAddrV4` and `IpAddrV6`. I don't see a point to keep the rather bad to read derived impl, especially so when pretty printing:

    V4(
        127.0.0.1
    )

From the `Display`, one can easily and unambiguously see if it's V4 or V6. Two examples:

```
127.0.0.1:443
[2001:db8:85a3::8a2e:370:7334]:443
```

Luckily the docs explicitly state that `Debug` output is not stable and that it may be changed at any time.

Using `Display` as `Debug` is very convenient for configuration structs (e.g. for webservers) that often just have a `derive(Debug)` and are printed that way to the one starting the server.
2020-08-14 14:46:44 -07:00
..
addr.rs Change Debug impl of SocketAddr and IpAddr to match their Display output 2020-07-28 17:48:47 +02:00
ip.rs Rollup merge of #74409 - LukasKalbertodt:improve-debug-impl-of-socketaddr-ipaddr, r=Amanieu 2020-08-14 14:46:44 -07:00
mod.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
parser.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
tcp.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
test.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
udp.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00