From 7b90bef62e554fc9da3782a02f96c70c1da09306 Mon Sep 17 00:00:00 2001 From: mulhern Date: Tue, 19 May 2026 16:07:14 -0400 Subject: [PATCH 1/2] Change signature of devs's value Change from aa{sv} to aa{ss}. This matches the signature from the previous implementation of the dbus layer. Signed-off-by: mulhern --- src/dbus/types.rs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/dbus/types.rs b/src/dbus/types.rs index 3a81c56b88..f4d7598e2f 100644 --- a/src/dbus/types.rs +++ b/src/dbus/types.rs @@ -80,11 +80,8 @@ impl<'a> From for Value<'a> { .iter() .map(|d| { let mut map = HashMap::new(); - map.insert( - "devnode".to_string(), - Value::from(d.devnode.display().to_string()), - ); - map.insert("uuid".to_string(), Value::from(d.uuid)); + map.insert("devnode".to_string(), d.devnode.display().to_string()); + map.insert("uuid".to_string(), d.uuid.simple().to_string()); map }) .collect::>(), @@ -137,11 +134,8 @@ fn stopped_pools_to_value<'b>( .iter() .map(|d| { let mut map = HashMap::new(); - map.insert( - "devnode".to_string(), - Value::from(d.devnode.display().to_string()), - ); - map.insert("uuid".to_string(), Value::from(d.uuid)); + map.insert("devnode".to_string(), d.devnode.display().to_string()); + map.insert("uuid".to_string(), d.uuid.simple().to_string()); map }) .collect::>(), From 5ee2c7176b2c6047ef8b90e37b2ebdaa1ac9d1bb Mon Sep 17 00:00:00 2001 From: mulhern Date: Tue, 19 May 2026 16:38:41 -0400 Subject: [PATCH 2/2] Remove unnecessary trait implementations The trait implementations for DevUuid and Filesystem Uuid were made unnecessary by the previous commit. Signed-off-by: mulhern --- src/dbus/types.rs | 34 +--------------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/src/dbus/types.rs b/src/dbus/types.rs index f4d7598e2f..377dff6614 100644 --- a/src/dbus/types.rs +++ b/src/dbus/types.rs @@ -8,9 +8,7 @@ use zbus::zvariant::{signature::Child, Basic, Signature, Type, Value}; use crate::{ dbus::util::result_option_to_tuple, - engine::{ - ActionAvailability, DevUuid, FilesystemUuid, LockedPoolsInfo, PoolUuid, StoppedPoolsInfo, - }, + engine::{ActionAvailability, LockedPoolsInfo, PoolUuid, StoppedPoolsInfo}, }; pub type FilesystemSpec<'a> = Vec<(&'a str, (bool, &'a str), (bool, &'a str))>; @@ -249,36 +247,6 @@ impl<'a> From for Value<'a> { } } -impl Basic for FilesystemUuid { - const SIGNATURE_CHAR: char = 's'; - const SIGNATURE_STR: &str = "s"; -} - -impl Type for FilesystemUuid { - const SIGNATURE: &Signature = &Signature::Str; -} - -impl<'a> From for Value<'a> { - fn from(u: FilesystemUuid) -> Value<'a> { - Value::from(u.simple().to_string()) - } -} - -impl Basic for DevUuid { - const SIGNATURE_CHAR: char = 's'; - const SIGNATURE_STR: &str = "s"; -} - -impl Type for DevUuid { - const SIGNATURE: &Signature = &Signature::Str; -} - -impl<'a> From for Value<'a> { - fn from(u: DevUuid) -> Value<'a> { - Value::from(u.simple().to_string()) - } -} - impl Type for ActionAvailability { const SIGNATURE: &Signature = &Signature::Str; }