mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 12:59:04 +00:00
std.mem.zeroes: remove call to std.meta
everybody is so horny for std.meta
This commit is contained in:
parent
9360cfebc7
commit
85492f2b91
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user