Add Uuid.Nil
This commit is contained in:
parent
ea950dfe4f
commit
5353169250
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue