diff options
-rw-r--r-- | Cargo.lock | 37 | ||||
-rw-r--r-- | Cargo.toml | 2 | ||||
-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 | ||||
-rw-r--r-- | servo-tidy.toml | 3 |
8 files changed, 34 insertions, 25 deletions
diff --git a/Cargo.lock b/Cargo.lock index 7fcfe69f26e..8bc10d4c13d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -435,7 +435,7 @@ dependencies = [ "log", "servo_config", "servo_rand", - "uuid", + "uuid 1.3.4", ] [[package]] @@ -1337,7 +1337,7 @@ dependencies = [ "servo_rand", "servo_url", "time 0.1.45", - "uuid", + "uuid 1.3.4", ] [[package]] @@ -1354,7 +1354,7 @@ dependencies = [ "serde", "servo_url", "time 0.1.45", - "uuid", + "uuid 1.3.4", ] [[package]] @@ -2890,7 +2890,7 @@ dependencies = [ "rand 0.7.3", "serde", "tempfile", - "uuid", + "uuid 0.8.2", ] [[package]] @@ -3458,7 +3458,7 @@ dependencies = [ "time 0.1.45", "tokio", "url", - "uuid", + "uuid 1.3.4", "void", "webrender_api", "xml5ever", @@ -3902,7 +3902,7 @@ dependencies = [ "tokio-test", "tungstenite", "url", - "uuid", + "uuid 1.3.4", "webrender_api", ] @@ -3946,7 +3946,7 @@ dependencies = [ "std_test_override", "time 0.1.45", "url", - "uuid", + "uuid 1.3.4", "webrender_api", ] @@ -5114,7 +5114,7 @@ dependencies = [ "unicode-segmentation", "url", "utf-8", - "uuid", + "uuid 1.3.4", "webdriver", "webgpu", "webrender_api", @@ -5209,7 +5209,7 @@ dependencies = [ "std_test_override", "style_traits", "time 0.1.45", - "uuid", + "uuid 1.3.4", "webdriver", "webgpu", "webrender_api", @@ -5520,7 +5520,7 @@ version = "0.1.0" source = "git+https://github.com/servo/media#f53ac0a03a1413362e15d39d1527466986d13c94" dependencies = [ "lazy_static", - "uuid", + "uuid 0.8.2", ] [[package]] @@ -5537,7 +5537,7 @@ dependencies = [ "lazy_static", "log", "servo-media-streams", - "uuid", + "uuid 0.8.2", ] [[package]] @@ -5625,7 +5625,7 @@ dependencies = [ "rand 0.7.3", "rand_core 0.5.1", "rand_isaac", - "uuid", + "uuid 1.3.4", ] [[package]] @@ -5646,7 +5646,7 @@ dependencies = [ "servo_rand", "to_shmem", "url", - "uuid", + "uuid 1.3.4", ] [[package]] @@ -6664,6 +6664,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" dependencies = [ "getrandom 0.2.8", +] + +[[package]] +name = "uuid" +version = "1.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa2982af2eec27de306107c027578ff7f423d65f7250e40ce0fea8f45248b81" +dependencies = [ + "getrandom 0.2.8", "serde", ] @@ -6954,7 +6963,7 @@ dependencies = [ "servo_config", "servo_url", "style_traits", - "uuid", + "uuid 1.3.4", "webdriver", ] diff --git a/Cargo.toml b/Cargo.toml index 62d66812f3b..6db41501853 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -75,7 +75,7 @@ tokio = "1" unicode-bidi = "0.3.4" unicode-script = "0.5" url = "2.0" -uuid = { version = "0.8", features = ["v4"] } +uuid = { version = "1.3.4", features = ["v4"] } webdriver = "0.48.0" winapi = "0.3" xi-unicode = "0.1.0" 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() } diff --git a/servo-tidy.toml b/servo-tidy.toml index 9de03263305..23c37b5da01 100644 --- a/servo-tidy.toml +++ b/servo-tidy.toml @@ -72,6 +72,9 @@ packages = [ # Duplicated by winit/surfman update. "raw-window-handle", + + # Temporarily duplicated until ipc-channels and gleam can be upgrded. + "uuid", ] # Files that are ignored for all tidy and lint checks. files = [ |