Skip to content

Commit

Permalink
Merge pull request #88 from hnez/clippy-2025-01-10
Browse files Browse the repository at this point in the history
Fix warnings introduced in cargo clippy 1.84.0
  • Loading branch information
SmithChart authored Jan 17, 2025
2 parents 51641a8 + 9831a81 commit 7dd740f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/dbus/rauc/update_channels.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/dbus/systemd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl ServiceStatus {
}

#[cfg(not(feature = "demo_mode"))]
async fn get<'a>(unit: &service::UnitProxy<'a>) -> Result<Self> {
async fn get(unit: &service::UnitProxy<'_>) -> Result<Self> {
Ok(Self {
active_state: unit.active_state().await?,
sub_state: unit.sub_state().await?,
Expand Down
2 changes: 1 addition & 1 deletion src/motd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 7dd740f

Please sign in to comment.