Add Uuid.Nil

This commit is contained in:
jaina heartles 2022-05-12 22:05:17 -07:00
parent ea950dfe4f
commit 5353169250

View file

@ -22,6 +22,8 @@ pub fn getRandom() std.rand.Random {
pub const Uuid = struct {
data: [16]u8,
pub const Nil = Uuid{ .data = @bitCast([16]u8, @as(u128, 0)) };
pub fn eql(lhs: Uuid, rhs: Uuid) bool {
return std.mem.eql(u8, &lhs.data, &rhs.data);
}