Skip to content

Commit 7dd740f

Browse files
authored
Merge pull request #88 from hnez/clippy-2025-01-10
Fix warnings introduced in cargo clippy 1.84.0
2 parents 51641a8 + 9831a81 commit 7dd740f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/dbus/rauc/update_channels.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,14 +224,14 @@ impl UpstreamBundle {
224224
pub(super) fn update_install(&mut self, slot_status: &SlotStatus) {
225225
let slot_0_is_older = slot_status
226226
.get("rootfs_0")
227-
.filter(|r| r.get("boot_status").map_or(false, |b| b == "good"))
227+
.filter(|r| r.get("boot_status").is_some_and(|b| b == "good"))
228228
.and_then(|r| r.get("bundle_version"))
229229
.and_then(|v| compare_versions(&self.version, v).map(|c| c.is_gt()))
230230
.unwrap_or(true);
231231

232232
let slot_1_is_older = slot_status
233233
.get("rootfs_1")
234-
.filter(|r| r.get("boot_status").map_or(false, |b| b == "good"))
234+
.filter(|r| r.get("boot_status").is_some_and(|b| b == "good"))
235235
.and_then(|r| r.get("bundle_version"))
236236
.and_then(|v| compare_versions(&self.version, v).map(|c| c.is_gt()))
237237
.unwrap_or(true);

src/dbus/systemd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ impl ServiceStatus {
8080
}
8181

8282
#[cfg(not(feature = "demo_mode"))]
83-
async fn get<'a>(unit: &service::UnitProxy<'a>) -> Result<Self> {
83+
async fn get(unit: &service::UnitProxy<'_>) -> Result<Self> {
8484
Ok(Self {
8585
active_state: unit.active_state().await?,
8686
sub_state: unit.sub_state().await?,

src/motd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ pub fn run(
211211
.filter_map(|ch| {
212212
ch.bundle
213213
.as_ref()
214-
.map_or(false, |b| b.newer_than_installed)
214+
.is_some_and(|b| b.newer_than_installed)
215215
.then_some(ch.url)
216216
})
217217
.collect();

0 commit comments

Comments
 (0)