aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiacomo Cavalieri <giacomo.cavalieri@icloud.com>2024-11-18 10:34:46 +0100
committerLouis Pilfold <louis@lpil.uk>2024-11-25 17:49:59 +0000
commitaa043addc0f15daa96e2be49ce43595444650a4f (patch)
treeee4cabff7e974f059d3113572c487ac3921e3636
parenta8f76ebd7220cd7eea37e45c5b5f6ec74679b459 (diff)
downloadgleam_stdlib-aa043addc0f15daa96e2be49ce43595444650a4f.tar.gz
gleam_stdlib-aa043addc0f15daa96e2be49ce43595444650a4f.zip
todo comment!
-rw-r--r--src/gleam/uri.gleam3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gleam/uri.gleam b/src/gleam/uri.gleam
index 2a5c190..9d78fe9 100644
--- a/src/gleam/uri.gleam
+++ b/src/gleam/uri.gleam
@@ -65,6 +65,9 @@ pub fn do_parse(uri_string: String) -> Result(Uri, Nil) {
query_with_question_mark: query,
fragment: fragment,
)) -> {
+ // TODO: instead of splitting the authority as a second step we can avoid
+ // going over this part of the string twice and incorporate the parsing in
+ // the main loop.
let AuthorityPieces(userinfo: userinfo, host: host, port: port) =
split_authority(authority_with_slashes)
Ok(Uri(