From fb6e86d5e814bd03a8db5048992fca862d6a02ce Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Mon, 9 Sep 2024 20:00:53 -0700 Subject: [PATCH] Fix some clippy warnings --- src/bin/steamosctl.rs | 2 +- src/manager/user.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bin/steamosctl.rs b/src/bin/steamosctl.rs index af0c9e1..a4cdef9 100644 --- a/src/bin/steamosctl.rs +++ b/src/bin/steamosctl.rs @@ -174,7 +174,7 @@ async fn get_all_properties(conn: &Connection) -> Result<()> { let introspection = Node::from_reader(Cursor::new(introspection))?; let properties_proxy = PropertiesProxy::new( - &conn, + conn, "com.steampowered.SteamOSManager1", "/com/steampowered/SteamOSManager1", ) diff --git a/src/manager/user.rs b/src/manager/user.rs index dfdc247..9c9d5c9 100644 --- a/src/manager/user.rs +++ b/src/manager/user.rs @@ -432,7 +432,7 @@ impl TdpLimit1 { async fn tdp_limit_min(&self) -> u32 { get_tdp_limit_range() .await - .and_then(|(min, _)| Ok(min)) + .map(|(min, _)| min) .unwrap_or(0) } @@ -440,7 +440,7 @@ impl TdpLimit1 { async fn tdp_limit_max(&self) -> u32 { get_tdp_limit_range() .await - .and_then(|(_, max)| Ok(max)) + .map(|(_, max)| max) .unwrap_or(0) } }