Skip to content

Commit a288456

Browse files
committed
return uint
1 parent c7235f4 commit a288456

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lightbug_http/address.mojo

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -330,14 +330,14 @@ fn resolve_localhost(host: String, network: NetworkType) -> String:
330330
return AddressConstants.IPV6_LOCALHOST
331331
return host
332332

333-
fn parse_ipv6_bracketed_address(address: String) raises -> (String, Int):
333+
fn parse_ipv6_bracketed_address(address: String) raises -> (String, UInt16):
334334
"""Parse an IPv6 address enclosed in brackets.
335335
336336
Returns:
337337
Tuple of (host, colon_index_offset)
338338
"""
339339
if address[0] != "[":
340-
return address, 0
340+
return address, UInt16(0)
341341

342342
var end_bracket_index = address.find("]")
343343
if end_bracket_index == -1:
@@ -352,7 +352,7 @@ fn parse_ipv6_bracketed_address(address: String) raises -> (String, Int):
352352

353353
return (
354354
address[1:end_bracket_index],
355-
end_bracket_index + 1
355+
UInt16(end_bracket_index + 1)
356356
)
357357

358358
fn validate_no_brackets(address: String, start_idx: Int, end_idx: Int = -1) raises:

0 commit comments

Comments
 (0)