refactor various Arc<EventId> to OwnedEventId
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
5a335933b8
commit
6458f4b195
29 changed files with 142 additions and 152 deletions
|
@ -88,7 +88,11 @@ impl Data {
|
|||
})
|
||||
}
|
||||
|
||||
pub(super) fn mark_as_referenced(&self, room_id: &RoomId, event_ids: &[Arc<EventId>]) {
|
||||
#[inline]
|
||||
pub(super) fn mark_as_referenced<'a, I>(&self, room_id: &RoomId, event_ids: I)
|
||||
where
|
||||
I: Iterator<Item = &'a EventId>,
|
||||
{
|
||||
for prev in event_ids {
|
||||
let key = (room_id, prev);
|
||||
self.referencedevents.put_raw(key, []);
|
||||
|
|
|
@ -98,9 +98,11 @@ impl Service {
|
|||
pdus
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[tracing::instrument(skip_all, level = "debug")]
|
||||
pub fn mark_as_referenced(&self, room_id: &RoomId, event_ids: &[Arc<EventId>]) {
|
||||
pub fn mark_as_referenced<'a, I>(&self, room_id: &RoomId, event_ids: I)
|
||||
where
|
||||
I: Iterator<Item = &'a EventId>,
|
||||
{
|
||||
self.db.mark_as_referenced(room_id, event_ids);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue