diff options
Diffstat (limited to 'lib/std/json/write_stream.zig')
| -rw-r--r-- | lib/std/json/write_stream.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/json/write_stream.zig b/lib/std/json/write_stream.zig index 61da6ec49b..3393f8a6ee 100644 --- a/lib/std/json/write_stream.zig +++ b/lib/std/json/write_stream.zig @@ -243,7 +243,7 @@ test "json write stream" { try w.beginObject(); try w.objectField("object"); - try w.emitJson(try getJsonObject(&arena_allocator.allocator)); + try w.emitJson(try getJsonObject(arena_allocator.allocator())); try w.objectField("string"); try w.emitString("This is a string"); @@ -286,7 +286,7 @@ test "json write stream" { try std.testing.expect(std.mem.eql(u8, expected, result)); } -fn getJsonObject(allocator: *std.mem.Allocator) !std.json.Value { +fn getJsonObject(allocator: std.mem.Allocator) !std.json.Value { var value = std.json.Value{ .Object = std.json.ObjectMap.init(allocator) }; try value.Object.put("one", std.json.Value{ .Integer = @intCast(i64, 1) }); try value.Object.put("two", std.json.Value{ .Float = 2.0 }); |
