commit 556db2ca36afccd623d80b620139a1428c7b65fa (tree)
parent 65a87ff299a364e7d8bab6256e0b05022f1a2620
Author: Techatrix <19954306+Techatrix@users.noreply.github.com>
Date: Tue, 20 Feb 2024 15:03:00 +0100
json: make std.json.stringifyAlloc return a mutable slice (#19013)
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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());