diff options
Diffstat (limited to 'components')
-rw-r--r-- | components/net/http_loader.rs | 2 | ||||
-rw-r--r-- | components/net/tests/fetch.rs | 2 | ||||
-rw-r--r-- | components/rand/lib.rs | 7 | ||||
-rw-r--r-- | components/script/dom/baseaudiocontext.rs | 2 | ||||
-rw-r--r-- | components/script/dom/node.rs | 4 |
5 files changed, 7 insertions, 10 deletions
diff --git a/components/net/http_loader.rs b/components/net/http_loader.rs index f79f67ce1d9..6a12100f3d1 100644 --- a/components/net/http_loader.rs +++ b/components/net/http_loader.rs @@ -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); diff --git a/components/net/tests/fetch.rs b/components/net/tests/fetch.rs index 4c0149b8f1a..3b0f18f1950 100644 --- a/components/net/tests/fetch.rs +++ b/components/net/tests/fetch.rs @@ -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, 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() } diff --git a/components/script/dom/baseaudiocontext.rs b/components/script/dom/baseaudiocontext.rs index ec7fcfc328e..0b193b25e29 100644 --- a/components/script/dom/baseaudiocontext.rs +++ b/components/script/dom/baseaudiocontext.rs @@ -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(), diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs index f419dcab485..a4012fb7a92 100644 --- a/components/script/dom/node.rs +++ b/components/script/dom/node.rs @@ -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() } |