authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-01-24 14:48:36 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-01-24 14:48:36 -08:00
log3c3e16042ff39b7b3cdd609b99ac5cff6853fb89
tree426002a8cc9b7a3c50d9546d0ec3af9126276ebc
parente4875fe79a7f41d0e4d92d3558bdbee2996096d4

this variable turned out to be redundant


1 files changed, 1 insertions(+), 3 deletions(-)

url.zig+1-3
......@@ -90,7 +90,6 @@ pub const URL = struct {
9090 var href = ManyArrayList(8 + 7, u8).init(alloc);
9191 defer href.deinit();
9292 var hostname_kind: HostKind = .unset;
93 var has_opaque_path = false;
9493 // scheme
9594 // :
9695 // //
......@@ -181,7 +180,6 @@ pub const URL = struct {
181180 else {
182181 href.clear(10);
183182 state = .opaque_path;
184 has_opaque_path = true;
185183 }
186184 }
187185 // 3. Otherwise, if state override is not given, set buffer to the empty string, state to no scheme state, and start over (from the first code point in input).
......@@ -833,7 +831,7 @@ pub const URL = struct {
833831 }
834832
835833 var path_offset: usize = 0;
836 if (hostname_kind == .unset and !has_opaque_path and std.mem.startsWith(u8, href.items(10), "//")) {
834 if (hostname_kind == .unset and std.mem.startsWith(u8, href.items(10), "//")) {
837835 try href.replace(10, 0, 0, "/.");
838836 path_offset += 2;
839837 }