From 7d2eeb68c8a2fb3f4d6baad6cc04c521b92974c0 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Wed, 24 Sep 2025 22:31:38 +0200 Subject: [PATCH] fix: more zig-0.15 API fixes --- src/cbor.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cbor.zig b/src/cbor.zig index 2f4dc82..770b4da 100644 --- a/src/cbor.zig +++ b/src/cbor.zig @@ -1376,7 +1376,7 @@ pub fn toJson(cbor_buf: []const u8, json_buf: []u8) (JsonEncodeError || Io.Write return writer.buffered(); } -pub fn toJsonWriter(cbor_buf: []const u8, writer: *Io.Writer, options: std.json.StringifyOptions) !void { +pub fn toJsonWriter(cbor_buf: []const u8, writer: *Io.Writer, options: std.json.Stringify.Options) !void { var s: json.Stringify = .{ .writer = writer, .options = options }; var iter: []const u8 = cbor_buf; try JsonWriter.jsonWriteValue(&s, &iter); @@ -1414,7 +1414,7 @@ pub fn toJsonPrettyAlloc(a: std.mem.Allocator, cbor_buf: []const u8) (JsonEncode return buf.toOwnedSlice(); } -pub fn toJsonOptsAlloc(a: std.mem.Allocator, cbor_buf: []const u8, opts: std.json.StringifyOptions) JsonEncodeError![]const u8 { +pub fn toJsonOptsAlloc(a: std.mem.Allocator, cbor_buf: []const u8, opts: std.json.Stringify.Options) JsonEncodeError![]const u8 { var buf = Io.Writer.Allocating.init(a); defer buf.deinit(); var s: json.Stringify = .{ .writer = &buf.writer, .options = opts };