ref: omit capture instead of dropping
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 49s
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 49s
This commit is contained in:
@@ -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.";
|
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!
|
// 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)))) {
|
switch (@typeInfo(@FieldType(Event, @tagName(accept_event)))) {
|
||||||
.void => |_| {},
|
.void => {},
|
||||||
else => @compileError(err_msg),
|
else => @compileError(err_msg),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ pub fn isTaggedUnion(comptime T: type) bool {
|
|||||||
/// Determine whether the provided type `T` is a `struct`.
|
/// Determine whether the provided type `T` is a `struct`.
|
||||||
pub fn isStruct(comptime T: type) bool {
|
pub fn isStruct(comptime T: type) bool {
|
||||||
return switch (@typeInfo(T)) {
|
return switch (@typeInfo(T)) {
|
||||||
.@"struct" => |_| true,
|
.@"struct" => true,
|
||||||
else => false,
|
else => false,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user