Optimize separate constraint for each stream argument.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-11-27 11:13:27 +00:00
parent 7666bb63d8
commit e84d6666c0
2 changed files with 7 additions and 5 deletions

View File

@@ -212,7 +212,7 @@ pub fn get_shared_rooms<'a>(
) -> impl Stream<Item = &RoomId> + 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)