mach: fmt

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-09-17 08:50:25 -07:00
parent 5e8ab95a74
commit 412df4490c

View file

@ -8,15 +8,15 @@ pub fn checkApplication(comptime app_pkg: type) void {
// If App has no fields, it gets interpretted as '*const App' when it should be '*App'
// This gives a more useful compiler error.
switch(@typeInfo(App)) {
switch (@typeInfo(App)) {
.Struct => |app| {
if(app.fields.len == 0) {
if (app.fields.len == 0) {
@compileError("App must contain fields. Example: '_unused: i32,'");
}
},
else => {
@compileError("App must be a struct type. Found:" ++ @typeName(App));
}
},
}
if (@hasDecl(App, "init")) {