Skip to content

Commit

Permalink
Update uuid
Browse files Browse the repository at this point in the history
This is required to use the new version of gleam and update ipc-channels
without duplicating the dependency in the future.
  • Loading branch information
mrobinson committed Jun 26, 2023
1 parent edeed11 commit 78464ee
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 25 deletions.
37 changes: 23 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion components/net/http_loader.rs
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion components/net/tests/fetch.rs
Expand Up @@ -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,
Expand Down
7 changes: 2 additions & 5 deletions components/rand/lib.rs
Expand Up @@ -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! {
Expand Down Expand Up @@ -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()
}
2 changes: 1 addition & 1 deletion components/script/dom/baseaudiocontext.rs
Expand Up @@ -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(),
Expand Down
4 changes: 2 additions & 2 deletions components/script/dom/node.rs
Expand Up @@ -1078,15 +1078,15 @@ 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
.unique_id
.as_ref()
.unwrap()
.borrow()
.to_simple()
.simple()
.to_string()
}

Expand Down
3 changes: 3 additions & 0 deletions servo-tidy.toml
Expand Up @@ -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 = [
Expand Down

0 comments on commit 78464ee

Please sign in to comment.