diff --git a/src/core/utils/set.rs b/src/core/utils/set.rs index 673ea858..d3485bb8 100644 --- a/src/core/utils/set.rs +++ b/src/core/utils/set.rs @@ -57,9 +57,10 @@ where /// Intersection of sets /// /// Outputs the set of elements common to both streams. Streams must be sorted. -pub fn intersection_sorted_stream2(a: S, b: S) -> impl Stream + Send +pub fn intersection_sorted_stream2(a: A, b: B) -> impl Stream + Send where - S: Stream + Send + Unpin, + A: Stream + Send, + B: Stream + Send + Unpin, Item: Eq + PartialOrd + Send + Sync, { use tokio::sync::Mutex; @@ -86,9 +87,10 @@ where /// /// Outputs the set of elements found in `a` which are not found in `b`. Streams /// must be sorted. -pub fn difference_sorted_stream2(a: S, b: S) -> impl Stream + Send +pub fn difference_sorted_stream2(a: A, b: B) -> impl Stream + Send where - S: Stream + Send + Unpin, + A: Stream + Send, + B: Stream + Send + Unpin, Item: Eq + PartialOrd + Send + Sync, { use tokio::sync::Mutex; diff --git a/src/service/rooms/state_cache/mod.rs b/src/service/rooms/state_cache/mod.rs index b109452e..03216c56 100644 --- a/src/service/rooms/state_cache/mod.rs +++ b/src/service/rooms/state_cache/mod.rs @@ -212,7 +212,7 @@ pub fn get_shared_rooms<'a>( ) -> impl Stream + Send + 'a { use tuwunel_core::utils::set; - let a = self.rooms_joined(user_a).boxed(); + let a = self.rooms_joined(user_a); let b = self.rooms_joined(user_b).boxed(); set::intersection_sorted_stream2(a, b)