Commit 9a9aa78
address_family: impl From<IpAddr> for AddressFamily
When writing AF-agnostic code it's convenient to get the appropriate
AddressFamily variant for a given IpAddr.
Since all platform variations of AddressFamily have Inet and Inet6
variants, we add the impl in a platform-agnostic manner.
Signed-off-by: Duncan Eastoe <[email protected]>1 parent a83f6ae commit 9a9aa78
2 files changed
+15
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
0 commit comments