From e3cb72e01d234ba905d232c6efc5cbe397afb8fb Mon Sep 17 00:00:00 2001 From: Lambda Date: Fri, 6 Sep 2024 18:33:22 +0000 Subject: [PATCH] globals: make filter_keys_single_server() associated function Moves the unused self up one level. --- src/service/globals.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/service/globals.rs b/src/service/globals.rs index 0a02ffe0..db02c7ea 100644 --- a/src/service/globals.rs +++ b/src/service/globals.rs @@ -542,6 +542,7 @@ impl Service { /// Filters the key map of multiple servers down to keys that should be /// accepted given the expiry time, room version, and timestamp of the /// paramters + #[expect(clippy::unused_self, reason = "exposed via services()")] pub(crate) fn filter_keys_server_map( &self, keys: BTreeMap, @@ -550,17 +551,19 @@ impl Service { ) -> BTreeMap> { keys.into_iter() .filter_map(|(server, keys)| { - self.filter_keys_single_server(keys, timestamp, room_version_id) - .map(|keys| (server, keys)) + Self::filter_keys_single_server( + keys, + timestamp, + room_version_id, + ) + .map(|keys| (server, keys)) }) .collect() } /// Filters the keys of a single server down to keys that should be accepted /// given the expiry time, room version, and timestamp of the paramters - #[expect(clippy::unused_self)] pub(crate) fn filter_keys_single_server( - &self, keys: SigningKeys, timestamp: MilliSecondsSinceUnixEpoch, _room_version_id: &RoomVersionId,