Skip to content

Commit

Permalink
simplify isStruct
Browse files Browse the repository at this point in the history
  • Loading branch information
arrufat committed May 10, 2024
1 parent 25c9de8 commit dbd566b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/meta.zig
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,5 @@ pub inline fn isScalar(comptime T: type) bool {

/// Returns true if and only if T represents a struct type.
pub inline fn isStruct(comptime T: type) bool {
return switch (@typeInfo(T)) {
.Struct => true,
else => false,
};
return @typeInfo(T) == .Struct;
}

0 comments on commit dbd566b

Please sign in to comment.