zig fmt :|

This commit is contained in:
Karl Seguin
2025-04-15 21:16:20 +08:00
parent ea6f8ce4d9
commit 753a093689
2 changed files with 11 additions and 12 deletions

View File

@@ -40,7 +40,9 @@ pub const MyObject = struct {
val: bool, val: bool,
pub fn constructor(do_set: bool) MyObject { pub fn constructor(do_set: bool) MyObject {
return .{.val = do_set,}; return .{
.val = do_set,
};
} }
pub fn named_get(_: *const MyObject, name: []const u8, has_value: *bool) ?OtherUnion { pub fn named_get(_: *const MyObject, name: []const u8, has_value: *bool) ?OtherUnion {

View File

@@ -408,15 +408,12 @@ pub const TrackingAllocator = struct {
} }
pub fn allocator(self: *TrackingAllocator) Allocator { pub fn allocator(self: *TrackingAllocator) Allocator {
return .{ return .{ .ptr = self, .vtable = &.{
.ptr = self,
.vtable = &.{
.alloc = alloc, .alloc = alloc,
.resize = resize, .resize = resize,
.free = free, .free = free,
.remap = remap, .remap = remap,
} } };
};
} }
fn alloc( fn alloc(