further optimize presence_since iteration

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-10-22 03:28:45 +00:00 committed by strawberry
parent c06f560913
commit 0e0438e1f9
5 changed files with 23 additions and 17 deletions

View file

@ -162,8 +162,7 @@ impl Service {
/// Returns the most recent presence updates that happened after the event
/// with id `since`.
#[inline]
pub fn presence_since(&self, since: u64) -> impl Stream<Item = (OwnedUserId, u64, Vec<u8>)> + Send + '_ {
pub fn presence_since(&self, since: u64) -> impl Stream<Item = (&UserId, u64, &[u8])> + Send + '_ {
self.db.presence_since(since)
}