diff options
| author | Tyler Mandry <tmandry@gmail.com> | 2020-08-14 14:46:44 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-14 14:46:44 -0700 |
| commit | 5b61230303824f34a25c388f6c6255d10c4366f8 (patch) | |
| tree | 854dcbcd20e0c98cceba0603716bdc2c4db075e8 /src/rustllvm/CoverageMappingWrapper.cpp | |
| parent | dae020d49116dc684b92b0f7d7c10b29520411f2 (diff) | |
| parent | 6293dca1e880394d90fe80055216328fe4d9702e (diff) | |
| download | rust-5b61230303824f34a25c388f6c6255d10c4366f8.tar.gz rust-5b61230303824f34a25c388f6c6255d10c4366f8.zip | |
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.
Diffstat (limited to 'src/rustllvm/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
