authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-05-21 12:58:21 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-05-21 12:58:21 -07:00
log25d3f448d09681b5bdb6c309d6559008eabf972f
treebe9a3460931d48e7da426ee9c5611c1dfe814adb
parentfde1cd00b8f46e629231eea37a78fd05a540bade

update to Zig 0.14


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

cookies.zig+2-2
...@@ -6,7 +6,7 @@ pub const Jar = std.StringHashMap(string);...@@ -6,7 +6,7 @@ pub const Jar = std.StringHashMap(string);
6pub fn parse(alloc: std.mem.Allocator, cookie_str: ?string) !Jar {6pub fn parse(alloc: std.mem.Allocator, cookie_str: ?string) !Jar {
7 var map = Jar.init(alloc);7 var map = Jar.init(alloc);
8 const h = cookie_str orelse return map;8 const h = cookie_str orelse return map;
9 var iter = std.mem.split(u8, h, "; ");9 var iter = std.mem.splitSequence(u8, h, "; ");
10 while (iter.next()) |item| {10 while (iter.next()) |item| {
11 const i = std.mem.indexOfScalar(u8, item, '=');11 const i = std.mem.indexOfScalar(u8, item, '=');
12 if (i == null) continue;12 if (i == null) continue;
...@@ -21,7 +21,7 @@ pub fn parse(alloc: std.mem.Allocator, cookie_str: ?string) !Jar {...@@ -21,7 +21,7 @@ pub fn parse(alloc: std.mem.Allocator, cookie_str: ?string) !Jar {
2121
22pub fn get(cookie_str: ?string, name: string) ?string {22pub fn get(cookie_str: ?string, name: string) ?string {
23 const h = cookie_str orelse return null;23 const h = cookie_str orelse return null;
24 var iter = std.mem.split(u8, h, "; ");24 var iter = std.mem.splitSequence(u8, h, "; ");
25 while (iter.next()) |item| {25 while (iter.next()) |item| {
26 const i = std.mem.indexOfScalar(u8, item, '=');26 const i = std.mem.indexOfScalar(u8, item, '=');
27 if (i == null) continue;27 if (i == null) continue;