fix some tests

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2025-02-05 11:26:08 +00:00
parent 0120acc116
commit 7da56bf7f4
2 changed files with 5 additions and 3 deletions

View File

@ -1223,7 +1223,7 @@ mod tests {
let exists = |id: <PduEvent as Event>::Id| ready(ev_map.get(&*id).is_some());
let state_sets = [state_at_bob, state_at_charlie];
let auth_chain = state_sets
let auth_chain: Vec<_> = state_sets
.iter()
.map(|map| store.auth_event_ids(room_id(), map.values().cloned().collect()).unwrap())
.collect();
@ -1330,7 +1330,7 @@ mod tests {
let ev_map = &store.0;
let state_sets = [state_set_a, state_set_b];
let auth_chain = state_sets
let auth_chain: Vec<_> = state_sets
.iter()
.map(|map| store.auth_event_ids(room_id(), map.values().cloned().collect()).unwrap())
.collect();

View File

@ -112,7 +112,7 @@ pub(crate) async fn do_check(
.collect::<Vec<_>>()
);
let auth_chain_sets = state_sets
let auth_chain_sets: Vec<_> = state_sets
.iter()
.map(|map| {
store.auth_event_ids(room_id(), map.values().cloned().collect()).unwrap()
@ -626,6 +626,7 @@ pub(crate) mod event {
}
}
#[allow(refining_impl_trait)]
fn prev_events(&self) -> Box<dyn DoubleEndedIterator<Item = &Self::Id> + Send + '_> {
match &self.rest {
Pdu::RoomV1Pdu(ev) => Box::new(ev.prev_events.iter().map(|(id, _)| id)),
@ -635,6 +636,7 @@ pub(crate) mod event {
}
}
#[allow(refining_impl_trait)]
fn auth_events(&self) -> Box<dyn DoubleEndedIterator<Item = &Self::Id> + Send + '_> {
match &self.rest {
Pdu::RoomV1Pdu(ev) => Box::new(ev.auth_events.iter().map(|(id, _)| id)),