Commit 96a18c6
authored
Add concrete IPv4 and IPv6 types (#21)
Motivation:
The `ARecord` and `AAAARecord` use the `IPAddress` `enum` as their
address types. However, they should only use IPv4 and IPv6 addresses
respectively.
Modifications:
- Add `IPAddress.IPv4` and IPAddress.IPv6` types and use them as the
associated values in the `IPAddress` enum
- Change the casing of the `IPAddress` cases from `.IPv4` and `.IPv6` to
`.ipv4` and `.ipv6` as Swift case names are usually lower-camel case
Result:
- The types of IP address used by `ARecord` and `AAAARecord` are clearer1 parent 62fbedd commit 96a18c6
File tree
4 files changed
+36
-16
lines changed- Sources/AsyncDNSResolver
- c-ares
- dnssd
- Tests/AsyncDNSResolverTests/dnssd
4 files changed
+36
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
189 | | - | |
| 188 | + | |
| 189 | + | |
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
197 | 215 | | |
198 | 216 | | |
199 | 217 | | |
200 | 218 | | |
201 | 219 | | |
202 | | - | |
| 220 | + | |
203 | 221 | | |
204 | 222 | | |
205 | 223 | | |
| |||
208 | 226 | | |
209 | 227 | | |
210 | 228 | | |
211 | | - | |
| 229 | + | |
212 | 230 | | |
213 | 231 | | |
214 | 232 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
579 | 579 | | |
580 | 580 | | |
581 | 581 | | |
582 | | - | |
| 582 | + | |
583 | 583 | | |
584 | 584 | | |
585 | 585 | | |
586 | 586 | | |
587 | | - | |
| 587 | + | |
588 | 588 | | |
| 589 | + | |
589 | 590 | | |
| 591 | + | |
590 | 592 | | |
591 | 593 | | |
592 | 594 | | |
593 | 595 | | |
594 | | - | |
| 596 | + | |
595 | 597 | | |
596 | 598 | | |
597 | 599 | | |
598 | 600 | | |
599 | 601 | | |
600 | | - | |
| 602 | + | |
601 | 603 | | |
602 | 604 | | |
603 | 605 | | |
604 | 606 | | |
605 | 607 | | |
606 | 608 | | |
607 | | - | |
| 609 | + | |
608 | 610 | | |
609 | 611 | | |
610 | 612 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
| 233 | + | |
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
256 | | - | |
| 256 | + | |
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| |||
0 commit comments