state-res: Rename generic parameter

This commit is contained in:
Jonas Platte 2021-11-27 18:13:32 +01:00
parent 881f64fd64
commit 399bd7d82d
No known key found for this signature in database
GPG Key ID: 7D261D771D915378

View File

@ -53,15 +53,15 @@ type EventMap<T> = HashMap<Box<EventId>, T>;
/// ///
/// The caller of `resolve` must ensure that all the events are from the same room. Although this /// The caller of `resolve` must ensure that all the events are from the same room. Although this
/// function takes a `RoomId` it does not check that each event is part of the same room. /// function takes a `RoomId` it does not check that each event is part of the same room.
pub fn resolve<'a, E, SSI>( pub fn resolve<'a, E, SetIter>(
room_version: &RoomVersionId, room_version: &RoomVersionId,
state_sets: impl IntoIterator<IntoIter = SSI>, state_sets: impl IntoIterator<IntoIter = SetIter>,
auth_chain_sets: Vec<HashSet<Box<EventId>>>, auth_chain_sets: Vec<HashSet<Box<EventId>>>,
fetch_event: impl Fn(&EventId) -> Option<E>, fetch_event: impl Fn(&EventId) -> Option<E>,
) -> Result<StateMap<Box<EventId>>> ) -> Result<StateMap<Box<EventId>>>
where where
E: Event + Clone, E: Event + Clone,
SSI: Iterator<Item = &'a StateMap<Box<EventId>>> + Clone, SetIter: Iterator<Item = &'a StateMap<Box<EventId>>> + Clone,
{ {
info!("State resolution starting"); info!("State resolution starting");