generalize return value wrapping to not require Arc

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-11-26 00:35:03 +00:00
parent 238523f177
commit f69c596f56
3 changed files with 18 additions and 7 deletions

View file

@ -102,7 +102,11 @@ impl Service {
.iter()
.stream()
.map(|&new| parse_compressed_state_event(new).1)
.then(|shorteventid| self.services.short.get_eventid_from_short(shorteventid))
.then(|shorteventid| {
self.services
.short
.get_eventid_from_short::<Box<_>>(shorteventid)
})
.ignore_err();
pin_mut!(event_ids);
@ -433,7 +437,7 @@ impl Service {
.await
.into_iter()
.stream()
.and_then(|event_id| async move { self.services.timeline.get_pdu(&event_id).await })
.and_then(|event_id: OwnedEventId| async move { self.services.timeline.get_pdu(&event_id).await })
.collect()
.await;