mirror of
https://github.com/girlbossceo/conduwuit.git
synced 2024-11-27 11:45:23 +00:00
Remove unneeded intermediary container collection
This commit is contained in:
parent
27788af022
commit
487601a249
|
@ -1397,10 +1397,10 @@ async fn upgrade_outlier_to_timeline_pdu(
|
||||||
extremity_sstatehashes.insert(sstatehash, prev_event);
|
extremity_sstatehashes.insert(sstatehash, prev_event);
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut fork_states = Vec::new();
|
|
||||||
|
|
||||||
if okay {
|
if okay {
|
||||||
for (sstatehash, prev_event) in extremity_sstatehashes {
|
let fork_states: Vec<_> = extremity_sstatehashes
|
||||||
|
.into_iter()
|
||||||
|
.map(|(sstatehash, prev_event)| {
|
||||||
let mut leaf_state = db
|
let mut leaf_state = db
|
||||||
.rooms
|
.rooms
|
||||||
.state_full_ids(sstatehash)
|
.state_full_ids(sstatehash)
|
||||||
|
@ -1415,21 +1415,16 @@ async fn upgrade_outlier_to_timeline_pdu(
|
||||||
// Now it's the state after the pdu
|
// Now it's the state after the pdu
|
||||||
}
|
}
|
||||||
|
|
||||||
fork_states.push(leaf_state);
|
leaf_state
|
||||||
}
|
|
||||||
|
|
||||||
let fork_states = &fork_states
|
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|map| {
|
|
||||||
map.into_iter()
|
|
||||||
.map(|(k, id)| (db.rooms.get_statekey_from_short(k).map(|k| (k, id))))
|
.map(|(k, id)| (db.rooms.get_statekey_from_short(k).map(|k| (k, id))))
|
||||||
.collect::<Result<StateMap<_>>>()
|
.collect::<Result<StateMap<_>>>()
|
||||||
|
.map_err(|_| "Failed to get_statekey_from_short.".to_owned())
|
||||||
})
|
})
|
||||||
.collect::<Result<Vec<_>>>()
|
.collect::<StdResult<_, _>>()?;
|
||||||
.map_err(|_| "Failed to get_statekey_from_short.".to_owned())?;
|
|
||||||
|
|
||||||
let mut auth_chain_sets = Vec::new();
|
let mut auth_chain_sets = Vec::new();
|
||||||
for state in fork_states {
|
for state in &fork_states {
|
||||||
auth_chain_sets.push(
|
auth_chain_sets.push(
|
||||||
get_auth_chain(
|
get_auth_chain(
|
||||||
&room_id,
|
&room_id,
|
||||||
|
|
Loading…
Reference in a new issue