| author | |
| committer | |
| log | cc06e6709bb5af14867d8cdd82daebbe7f4b22a8 |
| tree | 8ed05b7cf9791c5cdb78cf125a651515083f03b6 |
| parent | 3ea94ec9e260de535cc778c297f33c100d918465 |
3 files changed, 4 insertions(+), 2 deletions(-)
generate.ts+1-1| ... | ... | @@ -51,7 +51,7 @@ pub fn parsePass(input: []const u8, base: ?[]const u8, href: []const u8, origin: |
| 51 | 51 | _ = origin; |
| 52 | 52 | try expect(u.protocol).toEqualString(protocol); |
| 53 | 53 | try expect(u.username).toEqualString(username); |
| 54 | _ = password; | |
| 54 | try expect(u.password).toEqualString(password); | |
| 55 | 55 | _ = host; |
| 56 | 56 | _ = hostname; |
| 57 | 57 | _ = port; |
url.zig+2| ... | ... | @@ -9,6 +9,7 @@ pub const URL = struct { |
| 9 | 9 | scheme: []const u8 = "", |
| 10 | 10 | protocol: []const u8, |
| 11 | 11 | username: []const u8, |
| 12 | password: []const u8, | |
| 12 | 13 | |
| 13 | 14 | pub const HostKind = enum { |
| 14 | 15 | name, |
| ... | ... | @@ -781,6 +782,7 @@ pub const URL = struct { |
| 781 | 782 | .href = _href, |
| 782 | 783 | .protocol = _href[0..extras.sum(usize, href.lengths[0..2])], |
| 783 | 784 | .username = _href[extras.sum(usize, href.lengths[0..2])..][0..href.lengths[3]], |
| 785 | .password = _href[extras.sum(usize, href.lengths[0..4])..][0..href.lengths[5]], | |
| 784 | 786 | }; |
| 785 | 787 | return url; |
| 786 | 788 | } |
zig-out/test.zig+1-1| ... | ... | @@ -21,7 +21,7 @@ pub fn parsePass(input: []const u8, base: ?[]const u8, href: []const u8, origin: |
| 21 | 21 | _ = origin; |
| 22 | 22 | try expect(u.protocol).toEqualString(protocol); |
| 23 | 23 | try expect(u.username).toEqualString(username); |
| 24 | _ = password; | |
| 24 | try expect(u.password).toEqualString(password); | |
| 25 | 25 | _ = host; |
| 26 | 26 | _ = hostname; |
| 27 | 27 | _ = port; |