Add Uuid.Nil

This commit is contained in:
jaina heartles 2022-05-12 22:05:17 -07:00
parent ea950dfe4f
commit 5353169250
1 changed files with 2 additions and 0 deletions

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);
}