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 {...@@ -90,7 +90,6 @@ pub const URL = struct {
90 var href = ManyArrayList(8 + 7, u8).init(alloc);90 var href = ManyArrayList(8 + 7, u8).init(alloc);
91 defer href.deinit();91 defer href.deinit();
92 var hostname_kind: HostKind = .unset;92 var hostname_kind: HostKind = .unset;
93 var has_opaque_path = false;
94 // scheme93 // scheme
95 // :94 // :
96 // //95 // //
...@@ -181,7 +180,6 @@ pub const URL = struct {...@@ -181,7 +180,6 @@ pub const URL = struct {
181 else {180 else {
182 href.clear(10);181 href.clear(10);
183 state = .opaque_path;182 state = .opaque_path;
184 has_opaque_path = true;
185 }183 }
186 }184 }
187 // 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).185 // 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 {...@@ -833,7 +831,7 @@ pub const URL = struct {
833 }831 }
834832
835 var path_offset: usize = 0;833 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), "//")) {
837 try href.replace(10, 0, 0, "/.");835 try href.replace(10, 0, 0, "/.");
838 path_offset += 2;836 path_offset += 2;
839 }837 }