From 69743ae0de8d57f0ee86657b4cca67fe993768e3 Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Wed, 18 Dec 2024 13:09:33 +0100 Subject: [PATCH] chore: Make Clippy happy. --- crates/matrix-sdk-crypto/src/verification/requests.rs | 2 +- crates/matrix-sdk/src/room/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/matrix-sdk-crypto/src/verification/requests.rs b/crates/matrix-sdk-crypto/src/verification/requests.rs index 4c25a969807..50960185a8f 100644 --- a/crates/matrix-sdk-crypto/src/verification/requests.rs +++ b/crates/matrix-sdk-crypto/src/verification/requests.rs @@ -658,7 +658,7 @@ impl VerificationRequest { let recip_devices: Vec = self .recipient_devices .iter() - .filter(|&d| filter_device.map_or(true, |device| **d != *device)) + .filter(|&d| filter_device.is_none_or(|device| **d != *device)) .cloned() .collect(); diff --git a/crates/matrix-sdk/src/room/mod.rs b/crates/matrix-sdk/src/room/mod.rs index 30a3eed4de5..6ee2995822d 100644 --- a/crates/matrix-sdk/src/room/mod.rs +++ b/crates/matrix-sdk/src/room/mod.rs @@ -1813,7 +1813,7 @@ impl Room { // A member has no unknown devices iff it was tracked *and* the tracking is // not considered dirty. let members_with_unknown_devices = - members.iter().filter(|member| tracked.get(*member).map_or(true, |dirty| *dirty)); + members.iter().filter(|member| tracked.get(*member).is_none_or(|dirty| *dirty)); let (req_id, request) = olm.query_keys_for_users(members_with_unknown_devices.map(|owned| owned.borrow()));