From 556db2ca36afccd623d80b620139a1428c7b65fa Mon Sep 17 00:00:00 2001 From: Techatrix <19954306+Techatrix@users.noreply.github.com> Date: Tue, 20 Feb 2024 15:03:00 +0100 Subject: [PATCH] json: make std.json.stringifyAlloc return a mutable slice (#19013) --- lib/std/json/stringify.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/json/stringify.zig b/lib/std/json/stringify.zig index 37fd7efb17..add35e80bf 100644 --- a/lib/std/json/stringify.zig +++ b/lib/std/json/stringify.zig @@ -88,7 +88,7 @@ pub fn stringifyAlloc( allocator: Allocator, value: anytype, options: StringifyOptions, -) error{OutOfMemory}![]const u8 { +) error{OutOfMemory}![]u8 { var list = std.ArrayList(u8).init(allocator); errdefer list.deinit(); try stringifyArbitraryDepth(allocator, value, options, list.writer());