mirror of
https://github.com/servo/servo.git
synced 2025-09-01 10:38:25 +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
|
@ -1683,7 +1683,7 @@ async fn http_network_fetch(
|
|||
let request_id = context
|
||||
.devtools_chan
|
||||
.as_ref()
|
||||
.map(|_| uuid::Uuid::new_v4().to_simple().to_string());
|
||||
.map(|_| uuid::Uuid::new_v4().simple().to_string());
|
||||
|
||||
if log_enabled!(log::Level::Info) {
|
||||
info!("{:?} request for {}", request.method, url);
|
||||
|
|
|
@ -198,7 +198,7 @@ fn test_fetch_blob() {
|
|||
true,
|
||||
"http://www.example.org".into(),
|
||||
);
|
||||
let url = ServoUrl::parse(&format!("blob:{}{}", origin.as_str(), id.to_simple())).unwrap();
|
||||
let url = ServoUrl::parse(&format!("blob:{}{}", origin.as_str(), id.simple())).unwrap();
|
||||
|
||||
let mut request = Request::new(
|
||||
url,
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
|
|
|
@ -447,7 +447,7 @@ impl BaseAudioContextMethods for BaseAudioContext {
|
|||
if audio_data.len() > 0 {
|
||||
// Step 2.
|
||||
// XXX detach array buffer.
|
||||
let uuid = Uuid::new_v4().to_simple().to_string();
|
||||
let uuid = Uuid::new_v4().simple().to_string();
|
||||
let uuid_ = uuid.clone();
|
||||
self.decode_resolvers.borrow_mut().insert(
|
||||
uuid.clone(),
|
||||
|
|
|
@ -1078,7 +1078,7 @@ impl Node {
|
|||
|
||||
if rare_data.unique_id.is_none() {
|
||||
let id = UniqueId::new();
|
||||
ScriptThread::save_node_id(id.borrow().to_simple().to_string());
|
||||
ScriptThread::save_node_id(id.borrow().simple().to_string());
|
||||
rare_data.unique_id = Some(id);
|
||||
}
|
||||
rare_data
|
||||
|
@ -1086,7 +1086,7 @@ impl Node {
|
|||
.as_ref()
|
||||
.unwrap()
|
||||
.borrow()
|
||||
.to_simple()
|
||||
.simple()
|
||||
.to_string()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue