Skip to content

Commit 753a093

Browse files
committed
zig fmt :|
1 parent ea6f8ce commit 753a093

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

src/runtime/test_object_types.zig

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,19 @@ pub const MyObject = struct {
4040
val: bool,
4141

4242
pub fn constructor(do_set: bool) MyObject {
43-
return .{.val = do_set,};
43+
return .{
44+
.val = do_set,
45+
};
4446
}
4547

4648
pub fn named_get(_: *const MyObject, name: []const u8, has_value: *bool) ?OtherUnion {
4749
if (std.mem.eql(u8, name, "a")) {
4850
has_value.* = true;
49-
return .{.Other = .{.val = 4}};
51+
return .{ .Other = .{ .val = 4 } };
5052
}
5153
if (std.mem.eql(u8, name, "c")) {
5254
has_value.* = true;
53-
return .{.Bool = true};
55+
return .{ .Bool = true };
5456
}
5557
has_value.* = false;
5658
return null;

src/test_runner.zig

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -408,15 +408,12 @@ pub const TrackingAllocator = struct {
408408
}
409409

410410
pub fn allocator(self: *TrackingAllocator) Allocator {
411-
return .{
412-
.ptr = self,
413-
.vtable = &.{
414-
.alloc = alloc,
415-
.resize = resize,
416-
.free = free,
417-
.remap = remap,
418-
}
419-
};
411+
return .{ .ptr = self, .vtable = &.{
412+
.alloc = alloc,
413+
.resize = resize,
414+
.free = free,
415+
.remap = remap,
416+
} };
420417
}
421418

422419
fn alloc(

0 commit comments

Comments
 (0)