mem.zeroes - add sentinel terminated array support

This commit is contained in:
Sebastian
2020-04-01 09:11:05 +01:00
parent a5af78c376
commit 92a423739d

View File

@@ -341,6 +341,9 @@ pub fn zeroes(comptime T: type) T {
}
},
.Array => |info| {
if (info.sentinel) |sentinel| {
return [_:info.sentinel]info.child{zeroes(info.child)} ** info.len;
}
return [_]info.child{zeroes(info.child)} ** info.len;
},
.Vector,