Move state_res topological_sort out of resolve.
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
@@ -65,11 +65,13 @@ mod fetch_state;
|
||||
mod resolve;
|
||||
#[cfg(test)]
|
||||
mod test_utils;
|
||||
mod topological_sort;
|
||||
|
||||
use self::{event_auth::check_state_dependent_auth_rules, fetch_state::FetchStateExt};
|
||||
pub use self::{
|
||||
event_auth::{AuthTypes, auth_check, auth_types_for_event},
|
||||
event_format::check_pdu_format,
|
||||
resolve::{AuthSet, ConflictMap, StateMap, resolve, topological_sort},
|
||||
resolve::{AuthSet, ConflictMap, StateMap, resolve},
|
||||
topological_sort::topological_sort,
|
||||
};
|
||||
use crate::matrix::TypeStateKey;
|
||||
|
||||
@@ -7,7 +7,6 @@ mod iterative_auth_check;
|
||||
mod mainline_sort;
|
||||
mod power_sort;
|
||||
mod split_conflicted;
|
||||
mod topological_sort;
|
||||
|
||||
use std::collections::{BTreeMap, BTreeSet, HashSet};
|
||||
|
||||
@@ -15,7 +14,6 @@ use futures::{FutureExt, Stream, StreamExt, TryFutureExt};
|
||||
use itertools::Itertools;
|
||||
use ruma::{OwnedEventId, events::StateEventType, room_version_rules::RoomVersionRules};
|
||||
|
||||
pub use self::topological_sort::topological_sort;
|
||||
use self::{
|
||||
auth_difference::auth_difference, conflicted_subgraph::conflicted_subgraph_dfs,
|
||||
iterative_auth_check::iterative_auth_check, mainline_sort::mainline_sort,
|
||||
|
||||
@@ -10,8 +10,8 @@ use ruma::{
|
||||
room_version_rules::RoomVersionRules,
|
||||
};
|
||||
|
||||
use super::{
|
||||
super::events::{
|
||||
use super::super::{
|
||||
events::{
|
||||
RoomCreateEvent, RoomPowerLevelsEvent, RoomPowerLevelsIntField, is_power_event,
|
||||
power_levels::RoomPowerLevelsEventOptionExt,
|
||||
},
|
||||
|
||||
@@ -499,7 +499,7 @@ async fn test_reverse_topological_power_sort() {
|
||||
event_id("p") => hashset![event_id("o")],
|
||||
};
|
||||
|
||||
let res = super::topological_sort(&graph, &async |_id| {
|
||||
let res = super::super::topological_sort(&graph, &async |_id| {
|
||||
Ok((int!(0).into(), MilliSecondsSinceUnixEpoch(uint!(0))))
|
||||
})
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user