From 8502283e98200e7863ec3cf2317bfc90d14e2785 Mon Sep 17 00:00:00 2001 From: Martin Ashby Date: Fri, 25 Oct 2024 21:03:04 +0100 Subject: [PATCH] Fix breaking zig change in 0.14.0; renamed std.rand.Random -> std.Random Caused by https://github.com/ziglang/zig/pull/18867 --- src/v4.zig | 2 +- src/v7.zig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/v4.zig b/src/v4.zig index fbf1711..0db1588 100644 --- a/src/v4.zig +++ b/src/v4.zig @@ -5,7 +5,7 @@ const Uuid = core.Uuid; const rand = std.crypto.random; /// Create a version 4 UUID using a user provided RNG -pub fn new2(r: std.rand.Random) Uuid { +pub fn new2(r: std.Random) Uuid { // Set all bits to pseudo-randomly chosen values. var uuid: Uuid = r.int(Uuid); // Set the two most significant bits of the diff --git a/src/v7.zig b/src/v7.zig index c1231a7..98becd7 100644 --- a/src/v7.zig +++ b/src/v7.zig @@ -14,7 +14,7 @@ const time = std.time; /// /// Implementations SHOULD utilize this UUID over /// version 1 and 6 if possible. -pub fn new2(r: std.rand.Random, millis: *const fn () i64) Uuid { +pub fn new2(r: std.Random, millis: *const fn () i64) Uuid { // 0 1 2 3 // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+