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

This commit is contained in:
Techatrix 2024-02-20 15:03:00 +01:00 committed by GitHub
parent 65a87ff299
commit 556db2ca36
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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());