diff --git a/src/api/client/relations.rs b/src/api/client/relations.rs index 9a1e017dc..1ef92898c 100644 --- a/src/api/client/relations.rs +++ b/src/api/client/relations.rs @@ -98,6 +98,10 @@ pub(crate) async fn get_relating_events_route( .await } +// Spec (v1.10) recommends a depth of at least 3 +const RECURSION_DEPTH: u8 = 3; +const LEVELS_BELOW: u8 = RECURSION_DEPTH - 1; + #[allow(clippy::too_many_arguments)] async fn paginate_relations_with_filter( services: &Services, @@ -147,9 +151,6 @@ async fn paginate_relations_with_filter( .unwrap_or(30) .min(100); - // Spec (v1.10) recommends a depth of at least 3 - const RECURSION_DEPTH: u8 = 3; - const LEVELS_BELOW: u8 = RECURSION_DEPTH - 1; let max_depth = if recurse { LEVELS_BELOW } else { 0 }; // One more than the limit, to know whether there's another page diff --git a/src/service/rooms/pdu_metadata/data.rs b/src/service/rooms/pdu_metadata/data.rs index d85c226cb..58ee0c8fe 100644 --- a/src/service/rooms/pdu_metadata/data.rs +++ b/src/service/rooms/pdu_metadata/data.rs @@ -53,13 +53,13 @@ impl Data { self.tofrom_relation.aput_raw::(key, []); } - pub(super) fn get_relations<'a>( - &'a self, + pub(super) fn get_relations( + &self, shortroomid: ShortRoomId, target: u64, from: PduCount, dir: Direction, - ) -> impl Stream + Send + 'a { + ) -> impl Stream + Send + '_ { let start_count = match from { | PduCount::Normal(count) => count, | PduCount::Backfilled(_) => 0,