diff --git a/src/dbus/rauc/update_channels.rs b/src/dbus/rauc/update_channels.rs index d0a0025..1a5fedd 100644 --- a/src/dbus/rauc/update_channels.rs +++ b/src/dbus/rauc/update_channels.rs @@ -224,14 +224,14 @@ impl UpstreamBundle { pub(super) fn update_install(&mut self, slot_status: &SlotStatus) { let slot_0_is_older = slot_status .get("rootfs_0") - .filter(|r| r.get("boot_status").map_or(false, |b| b == "good")) + .filter(|r| r.get("boot_status").is_some_and(|b| b == "good")) .and_then(|r| r.get("bundle_version")) .and_then(|v| compare_versions(&self.version, v).map(|c| c.is_gt())) .unwrap_or(true); let slot_1_is_older = slot_status .get("rootfs_1") - .filter(|r| r.get("boot_status").map_or(false, |b| b == "good")) + .filter(|r| r.get("boot_status").is_some_and(|b| b == "good")) .and_then(|r| r.get("bundle_version")) .and_then(|v| compare_versions(&self.version, v).map(|c| c.is_gt())) .unwrap_or(true); diff --git a/src/dbus/systemd.rs b/src/dbus/systemd.rs index 17173a1..e06f2dd 100644 --- a/src/dbus/systemd.rs +++ b/src/dbus/systemd.rs @@ -80,7 +80,7 @@ impl ServiceStatus { } #[cfg(not(feature = "demo_mode"))] - async fn get<'a>(unit: &service::UnitProxy<'a>) -> Result { + async fn get(unit: &service::UnitProxy<'_>) -> Result { Ok(Self { active_state: unit.active_state().await?, sub_state: unit.sub_state().await?, diff --git a/src/motd.rs b/src/motd.rs index c1db6c3..c2990d3 100644 --- a/src/motd.rs +++ b/src/motd.rs @@ -211,7 +211,7 @@ pub fn run( .filter_map(|ch| { ch.bundle .as_ref() - .map_or(false, |b| b.newer_than_installed) + .is_some_and(|b| b.newer_than_installed) .then_some(ch.url) }) .collect();