aboutsummaryrefslogtreecommitdiffstats
path: root/components/rand/lib.rs
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2023-06-26 14:37:10 +0200
committerMartin Robinson <mrobinson@igalia.com>2023-06-26 16:27:12 +0200
commit78464eeabcc0644a979d92882c3a170a698f18b1 (patch)
treeda41d06ab11130eb6455ad41d5c2f64d51f6ec39 /components/rand/lib.rs
parentedeed11cefba1524abbce55d398574c005b7687a (diff)
downloadservo-78464eeabcc0644a979d92882c3a170a698f18b1.tar.gz
servo-78464eeabcc0644a979d92882c3a170a698f18b1.zip
Update uuid
This is required to use the new version of gleam and update ipc-channels without duplicating the dependency in the future.
Diffstat (limited to 'components/rand/lib.rs')
-rw-r--r--components/rand/lib.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/components/rand/lib.rs b/components/rand/lib.rs
index 4ea2b6e004a..263f9dd5a2c 100644
--- a/components/rand/lib.rs
+++ b/components/rand/lib.rs
@@ -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()
}