From 9e55f946f3d8f0f71913acf65725c2aca0d80813 Mon Sep 17 00:00:00 2001 From: Jeremy Whiting Date: Mon, 6 May 2024 14:56:58 -0600 Subject: [PATCH] Fix user_manager test by adding mismatched return types. Also add a note in failing argument length test about which method we are checking for easier finding the problems. --- src/user_manager.rs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/user_manager.rs b/src/user_manager.rs index a3d1f59..43220eb 100644 --- a/src/user_manager.rs +++ b/src/user_manager.rs @@ -144,15 +144,15 @@ impl SteamOSManagerUser { } } - async fn update_bios(&self) -> zbus::fdo::Result<()> { + async fn update_bios(&self) -> zbus::fdo::Result { method!(self, "UpdateBios") } - async fn update_dock(&self) -> zbus::fdo::Result<()> { + async fn update_dock(&self) -> zbus::fdo::Result { method!(self, "UpdateDock") } - async fn trim_devices(&self) -> zbus::fdo::Result<()> { + async fn trim_devices(&self) -> zbus::fdo::Result { method!(self, "TrimDevices") } @@ -161,7 +161,7 @@ impl SteamOSManagerUser { device: &str, label: &str, validate: bool, - ) -> zbus::fdo::Result<()> { + ) -> zbus::fdo::Result { method!(self, "FormatDevice", device, label, validate) } @@ -351,7 +351,13 @@ mod test { let remote_method = remote_methods.get(*key).expect(key); assert_eq!(local_method.name(), remote_method.name()); - assert_eq!(local_method.args().len(), remote_method.args().len()); + assert_eq!( + local_method.args().len(), + remote_method.args().len(), + "Testing {:?} against {:?}", + local_method, + remote_method + ); for (local_arg, remote_arg) in zip(local_method.args().iter(), remote_method.args().iter()) {