aboutsummaryrefslogtreecommitdiff
path: root/core/net
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2023-08-08 14:57:25 +0100
committergingerBill <bill@gingerbill.org>2023-08-08 14:57:25 +0100
commitcd74cdfdaf5157704b836c8de1c32b5a03dddcae (patch)
tree39d88a4b0ce0237d303fb1153dfe3c970e819a52 /core/net
parent49ab935ae9268264fe40177690292ea890f6a7e3 (diff)
Remove `switch in` in favour of `switch _ in`
Diffstat (limited to 'core/net')
-rw-r--r--core/net/addr.odin4
-rw-r--r--core/net/dns.odin6
2 files changed, 5 insertions, 5 deletions
diff --git a/core/net/addr.odin b/core/net/addr.odin
index e6b503aaf..be04be15e 100644
--- a/core/net/addr.odin
+++ b/core/net/addr.odin
@@ -471,7 +471,7 @@ join_port :: proc(address_or_host: string, port: int, allocator := context.alloc
// hostname
fmt.sbprintf(&b, "%v:%v", addr_or_host, port)
} else {
- switch in addr {
+ switch _ in addr {
case IP4_Address:
fmt.sbprintf(&b, "%v:%v", address_to_string(addr), port)
case IP6_Address:
@@ -606,7 +606,7 @@ to_string :: proc{address_to_string, endpoint_to_string}
family_from_address :: proc(addr: Address) -> Address_Family {
- switch in addr {
+ switch _ in addr {
case IP4_Address: return .IP4
case IP6_Address: return .IP6
case:
diff --git a/core/net/dns.odin b/core/net/dns.odin
index 6afa844fe..27713d790 100644
--- a/core/net/dns.odin
+++ b/core/net/dns.odin
@@ -96,7 +96,7 @@ resolve :: proc(hostname_and_maybe_port: string) -> (ep4, ep6: Endpoint, err: Ne
switch t in target {
case Endpoint:
// NOTE(tetra): The hostname was actually an IP address; nothing to resolve, so just return it.
- switch in t.address {
+ switch _ in t.address {
case IP4_Address: ep4 = t
case IP6_Address: ep6 = t
case: unreachable()
@@ -122,7 +122,7 @@ resolve_ip4 :: proc(hostname_and_maybe_port: string) -> (ep4: Endpoint, err: Net
switch t in target {
case Endpoint:
// NOTE(tetra): The hostname was actually an IP address; nothing to resolve, so just return it.
- switch in t.address {
+ switch _ in t.address {
case IP4_Address:
return t, nil
case IP6_Address:
@@ -149,7 +149,7 @@ resolve_ip6 :: proc(hostname_and_maybe_port: string) -> (ep6: Endpoint, err: Net
switch t in target {
case Endpoint:
// NOTE(tetra): The hostname was actually an IP address; nothing to resolve, so just return it.
- switch in t.address {
+ switch _ in t.address {
case IP4_Address:
err = .Unable_To_Resolve
return