refactor to iterator inputs for auth_chain/short batch functions
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
5da42fb859
commit
3789d60b6a
10 changed files with 76 additions and 71 deletions
|
@ -35,12 +35,12 @@ pub async fn resolve_state(
|
|||
let fork_states = [current_state_ids, incoming_state];
|
||||
let mut auth_chain_sets = Vec::with_capacity(fork_states.len());
|
||||
for state in &fork_states {
|
||||
let starting_events: Vec<&EventId> = state.values().map(Borrow::borrow).collect();
|
||||
let starting_events = state.values().map(Borrow::borrow);
|
||||
|
||||
let auth_chain: HashSet<Arc<EventId>> = self
|
||||
.services
|
||||
.auth_chain
|
||||
.get_event_ids(room_id, &starting_events)
|
||||
.get_event_ids(room_id, starting_events)
|
||||
.await?
|
||||
.into_iter()
|
||||
.collect();
|
||||
|
|
|
@ -139,7 +139,7 @@ pub(super) async fn state_at_incoming_resolved(
|
|||
let auth_chain: HashSet<Arc<EventId>> = self
|
||||
.services
|
||||
.auth_chain
|
||||
.get_event_ids(room_id, &starting_events)
|
||||
.get_event_ids(room_id, starting_events.into_iter())
|
||||
.await?
|
||||
.into_iter()
|
||||
.collect();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue