authorgravatar for techatrix@mailbox.orgTechatrix <techatrix@mailbox.org> 2024-02-20 15:03:00+01:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2024-02-20 09:03:00-05:00
log556db2ca36afccd623d80b620139a1428c7b65fa
tree860752335c47d1fe92d48dc12b448852bb3d1041
parent65a87ff299a364e7d8bab6256e0b05022f1a2620
signaturebadge-check Signed by PGP key B5690EEEBB952194

json: make std.json.stringifyAlloc return a mutable slice (#19013)


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

lib/std/json/stringify.zig+1-1
...@@ -88,7 +88,7 @@ pub fn stringifyAlloc(...@@ -88,7 +88,7 @@ pub fn stringifyAlloc(
88 allocator: Allocator,88 allocator: Allocator,
89 value: anytype,89 value: anytype,
90 options: StringifyOptions,90 options: StringifyOptions,
91) error{OutOfMemory}![]const u8 {91) error{OutOfMemory}![]u8 {
92 var list = std.ArrayList(u8).init(allocator);92 var list = std.ArrayList(u8).init(allocator);
93 errdefer list.deinit();93 errdefer list.deinit();
94 try stringifyArbitraryDepth(allocator, value, options, list.writer());94 try stringifyArbitraryDepth(allocator, value, options, list.writer());