mirror of
https://github.com/servo/servo.git
synced 2025-08-02 12:10:29 +01:00
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:
parent
edeed11cef
commit
78464eeabc
8 changed files with 34 additions and 25 deletions
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue