From 56dae17862eb284900439d2af21a715678f3e45a Mon Sep 17 00:00:00 2001 From: Gris Ge Date: Mon, 11 Jul 2022 20:51:46 +0800 Subject: [PATCH] nm: Upgrade to uuid 1.1 crate The uuid crate is upgrade from 0.8 to 1.1. Per Fedora request, we should upgrade to latest version. Signed-off-by: Gris Ge --- rust/src/cli/Cargo.toml | 2 +- rust/src/lib/Cargo.toml | 2 +- rust/src/lib/nm/connection.rs | 2 +- rust/src/lib/nm/nm_dbus/nm_api.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rust/src/cli/Cargo.toml b/rust/src/cli/Cargo.toml index 50d8305b..34bd8fdd 100644 --- a/rust/src/cli/Cargo.toml +++ b/rust/src/cli/Cargo.toml @@ -17,4 +17,4 @@ env_logger = "0.9.0" log = "0.4.14" serde_json = "1.0.75" ctrlc = "3.2.1" -uuid = { version = "0.8", features = ["v4"] } +uuid = { version = "1.1", features = ["v4"] } diff --git a/rust/src/lib/Cargo.toml b/rust/src/lib/Cargo.toml index 718e6e64..767235e2 100644 --- a/rust/src/lib/Cargo.toml +++ b/rust/src/lib/Cargo.toml @@ -21,7 +21,7 @@ nispor = "1.2.7" nix = "0.24.1" serde = { version = "1.0.132", features = ["derive"] } serde_json = "1.0.68" -uuid = { version = "0.8.2", features = ["v4", "v5"] } +uuid = { version = "1.1", features = ["v4", "v5"] } zbus = "1.9.2" zvariant = "2.10.0" diff --git a/rust/src/lib/nm/connection.rs b/rust/src/lib/nm/connection.rs index 3a49a9f8..2b85af39 100644 --- a/rust/src/lib/nm/connection.rs +++ b/rust/src/lib/nm/connection.rs @@ -509,6 +509,6 @@ fn uuid_from_name_and_type( &uuid::Uuid::NAMESPACE_URL, format!("{}://{}", iface_type, iface_name).as_bytes(), ) - .to_hyphenated() + .hyphenated() .to_string() } diff --git a/rust/src/lib/nm/nm_dbus/nm_api.rs b/rust/src/lib/nm/nm_dbus/nm_api.rs index eb999b78..9b14d342 100644 --- a/rust/src/lib/nm/nm_dbus/nm_api.rs +++ b/rust/src/lib/nm/nm_dbus/nm_api.rs @@ -205,7 +205,7 @@ impl<'a> NmApi<'a> { pub fn uuid_gen() -> String { // Use Linux random number generator (RNG) to generate UUID - uuid::Uuid::new_v4().to_hyphenated().to_string() + uuid::Uuid::new_v4().hyphenated().to_string() } pub fn active_connections_get( -- 2.37.0