Skip to content

Commit

Permalink
Explicit check for ok in zig
Browse files Browse the repository at this point in the history
  • Loading branch information
johanlindfors committed Nov 6, 2023
1 parent ea1eeaa commit 4e877d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zig/src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const Emulator = @import("emulator.zig").Emulator;

pub fn main() anyerror!void {
var gpalloc = std.heap.GeneralPurposeAllocator(.{}){};
defer std.debug.assert(!gpalloc.deinit());
defer std.debug.assert(gpalloc.deinit() == .ok);
const allocator = gpalloc.allocator();

const args = try std.process.argsAlloc(allocator);
Expand Down

0 comments on commit 4e877d3

Please sign in to comment.