mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-16 23:31:24 +01:00
globals: make filter_keys_single_server() associated function
Moves the unused self up one level.
This commit is contained in:
parent
cc3588ecbd
commit
e3cb72e01d
1 changed files with 7 additions and 4 deletions
|
|
@ -542,6 +542,7 @@ impl Service {
|
||||||
/// Filters the key map of multiple servers down to keys that should be
|
/// Filters the key map of multiple servers down to keys that should be
|
||||||
/// accepted given the expiry time, room version, and timestamp of the
|
/// accepted given the expiry time, room version, and timestamp of the
|
||||||
/// paramters
|
/// paramters
|
||||||
|
#[expect(clippy::unused_self, reason = "exposed via services()")]
|
||||||
pub(crate) fn filter_keys_server_map(
|
pub(crate) fn filter_keys_server_map(
|
||||||
&self,
|
&self,
|
||||||
keys: BTreeMap<String, SigningKeys>,
|
keys: BTreeMap<String, SigningKeys>,
|
||||||
|
|
@ -550,17 +551,19 @@ impl Service {
|
||||||
) -> BTreeMap<String, BTreeMap<String, Base64>> {
|
) -> BTreeMap<String, BTreeMap<String, Base64>> {
|
||||||
keys.into_iter()
|
keys.into_iter()
|
||||||
.filter_map(|(server, keys)| {
|
.filter_map(|(server, keys)| {
|
||||||
self.filter_keys_single_server(keys, timestamp, room_version_id)
|
Self::filter_keys_single_server(
|
||||||
.map(|keys| (server, keys))
|
keys,
|
||||||
|
timestamp,
|
||||||
|
room_version_id,
|
||||||
|
)
|
||||||
|
.map(|keys| (server, keys))
|
||||||
})
|
})
|
||||||
.collect()
|
.collect()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Filters the keys of a single server down to keys that should be accepted
|
/// 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
|
/// given the expiry time, room version, and timestamp of the paramters
|
||||||
#[expect(clippy::unused_self)]
|
|
||||||
pub(crate) fn filter_keys_single_server(
|
pub(crate) fn filter_keys_single_server(
|
||||||
&self,
|
|
||||||
keys: SigningKeys,
|
keys: SigningKeys,
|
||||||
timestamp: MilliSecondsSinceUnixEpoch,
|
timestamp: MilliSecondsSinceUnixEpoch,
|
||||||
_room_version_id: &RoomVersionId,
|
_room_version_id: &RoomVersionId,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue