Skip to content

Commit b7229b6

Browse files
committed
Refactor Uri module to use Uri.empty constant
1 parent bb8673e commit b7229b6

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

src/gleam/uri.gleam

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -100,18 +100,7 @@ pub fn parse(uri_string: String) -> Result(Uri, Nil) {
100100
// TODO: This is not perfect and will be more permissive than its Erlang
101101
// counterpart, ideally we want to replicate Erlang's implementation on the js
102102
// target as well.
103-
let default_pieces =
104-
Uri(
105-
scheme: None,
106-
userinfo: None,
107-
host: None,
108-
port: None,
109-
path: "",
110-
query: None,
111-
fragment: None,
112-
)
113-
114-
parse_scheme_loop(uri_string, uri_string, default_pieces, 0)
103+
parse_scheme_loop(uri_string, uri_string, empty, 0)
115104
}
116105

117106
fn parse_scheme_loop(

0 commit comments

Comments
 (0)