Update uuid

This is required to use the new version of gleam and update ipc-channels
without duplicating the dependency in the future.
This commit is contained in:
Martin Robinson 2023-06-26 14:37:10 +02:00
parent edeed11cef
commit 78464eeabc
8 changed files with 34 additions and 25 deletions

View file

@ -27,7 +27,7 @@ use std::cell::RefCell;
use std::rc::Rc;
use std::sync::Mutex;
use std::u64;
use uuid::{Builder, Uuid, Variant, Version};
use uuid::{Builder, Uuid};
// The shared RNG which may hold on to a file descriptor
lazy_static! {
@ -197,8 +197,5 @@ where
pub fn random_uuid() -> Uuid {
let mut bytes = [0; 16];
thread_rng().fill_bytes(&mut bytes);
Builder::from_bytes(bytes)
.set_variant(Variant::RFC4122)
.set_version(Version::Random)
.build()
Builder::from_random_bytes(bytes).into_uuid()
}