This commit is contained in:
Dominic Grimm 2025-06-19 16:55:59 +02:00
commit 184645ba63
Signed by: dergrimm
SSH key fingerprint: SHA256:0uoWpcqOtkyvQ+ZqBjNYiDqIZY+9s8VeZkkJ/4ryB4E
73 changed files with 4983 additions and 0 deletions

View file

@ -0,0 +1,16 @@
const std = @import("std");
pub fn ResultArena(comptime T: type) type {
return struct {
const Self = @This();
arena: *std.heap.ArenaAllocator,
value: T,
pub fn deinit(self: Self) void {
const allocator = self.arena.child_allocator;
self.arena.deinit();
allocator.destroy(self.arena);
}
};
}