ref: omit capture instead of dropping
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 49s

This commit is contained in:
2026-01-12 23:28:30 +01:00
parent 88c7eea356
commit 19d1602d3b
2 changed files with 2 additions and 2 deletions

View File

@@ -821,7 +821,7 @@ pub fn Button(Model: type, Event: type, Queue: type) fn (meta.FieldEnum(Event))
const err_msg = "Unexpected type for the associated input completion event to trigger. Only `void` is allowed.";
// TODO supported nested tagged unions to be also be used for triggering if the enum is then still of `void`type!
switch (@typeInfo(@FieldType(Event, @tagName(accept_event)))) {
.void => |_| {},
.void => {},
else => @compileError(err_msg),
}
}

View File

@@ -126,7 +126,7 @@ pub fn isTaggedUnion(comptime T: type) bool {
/// Determine whether the provided type `T` is a `struct`.
pub fn isStruct(comptime T: type) bool {
return switch (@typeInfo(T)) {
.@"struct" => |_| true,
.@"struct" => true,
else => false,
};
}