std.mem.zeroes: remove call to std.meta

everybody is so horny for std.meta
This commit is contained in:
Andrew Kelley 2022-06-12 00:56:01 -07:00
parent 9360cfebc7
commit 85492f2b91

View File

@ -268,7 +268,7 @@ pub fn zeroes(comptime T: type) T {
},
.Struct => |struct_info| {
if (@sizeOf(T) == 0) return T{};
if (comptime meta.containerLayout(T) == .Extern) {
if (struct_info.layout == .Extern) {
var item: T = undefined;
set(u8, asBytes(&item), 0);
return item;