authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-12-24 20:29:58 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-12-24 20:29:58 -08:00
logd9e27de43cebb036283df003e076b8f05fc0c7ef
tree5243d8d181c4b1492de01fbadfe93b1461997ba8
parentc17ee7cd55521b83de8219c43ad91c7fd5012535

update for zig 0.9.0


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

src/lib.zig+3-3
...@@ -307,11 +307,11 @@ fn fail(response: *http.Response, comptime err: string, args: anytype) !void {...@@ -307,11 +307,11 @@ fn fail(response: *http.Response, comptime err: string, args: anytype) !void {
307 try response.writer().print(err, args);307 try response.writer().print(err, args);
308}308}
309309
310fn redirectUri(alloc: *std.mem.Allocator, request: http.Request, callbackPath: string) !string {310fn redirectUri(alloc: std.mem.Allocator, request: http.Request, callbackPath: string) !string {
311 return try std.fmt.allocPrint(alloc, "http://{s}{s}", .{ request.host().?, callbackPath });311 return try std.fmt.allocPrint(alloc, "http://{s}{s}", .{ request.host().?, callbackPath });
312}312}
313313
314fn fixId(alloc: *std.mem.Allocator, id: json.Value) !string {314fn fixId(alloc: std.mem.Allocator, id: json.Value) !string {
315 return switch (id) {315 return switch (id) {
316 .String => |v| return v,316 .String => |v| return v,
317 .Int => |v| return try std.fmt.allocPrint(alloc, "{d}", .{v}),317 .Int => |v| return try std.fmt.allocPrint(alloc, "{d}", .{v}),
...@@ -327,7 +327,7 @@ fn fixId(alloc: *std.mem.Allocator, id: json.Value) !string {...@@ -327,7 +327,7 @@ fn fixId(alloc: *std.mem.Allocator, id: json.Value) !string {
327const UrlValues = struct {327const UrlValues = struct {
328 inner: std.StringArrayHashMap(string),328 inner: std.StringArrayHashMap(string),
329329
330 pub fn init(alloc: *std.mem.Allocator) UrlValues {330 pub fn init(alloc: std.mem.Allocator) UrlValues {
331 return .{331 return .{
332 .inner = std.StringArrayHashMap(string).init(alloc),332 .inner = std.StringArrayHashMap(string).init(alloc),
333 };333 };