Skip to content

Commit

Permalink
Fix breaking change introduced on json API (ziglang/zig#15705)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdmichaud committed May 19, 2023
1 parent 093de8c commit fbdb111
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,7 @@ pub fn main() !void {
const ZigEnv = struct {
lib_dir: []const u8,
};
var json_token_stream = std.json.TokenStream.init(result.stdout);
const zig_env = try std.json.parse(ZigEnv, &json_token_stream, .{
.allocator = arena,
const zig_env = try std.json.parseFromSlice(ZigEnv, arena, result.stdout, .{
.ignore_unknown_fields = true,
});
const sys_include = try fs.path.join(arena, &.{ zig_env.lib_dir, "include" });
Expand Down

0 comments on commit fbdb111

Please sign in to comment.