refactor to iterator inputs for auth_chain/short batch functions

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-11-22 12:25:46 +00:00
parent 5da42fb859
commit 3789d60b6a
10 changed files with 76 additions and 71 deletions

View file

@ -1,6 +1,7 @@
use std::{
collections::HashMap,
fmt::Write,
iter::once,
sync::Arc,
time::{Instant, SystemTime},
};
@ -43,7 +44,7 @@ pub(super) async fn get_auth_chain(&self, event_id: Box<EventId>) -> Result<Room
.services
.rooms
.auth_chain
.event_ids_iter(room_id, &[&event_id])
.event_ids_iter(room_id, once(event_id.as_ref()))
.await?
.count()
.await;