diff --git a/Cargo.toml b/Cargo.toml index fc28c60d..d47e54ca 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,6 @@ repository = "https://github.com/ruma/state-res" [dependencies] itertools = "0.9.0" js_int = "0.1.8" -petgraph = "0.5.1" serde = { version = "1.0.114", features = ["derive"] } serde_json = "1.0.56" tracing = "0.1.16" @@ -29,7 +28,6 @@ branch = "pdu-deserialize" features = ["client-api", "federation-api", "appservice-api"] [dev-dependencies] -lazy_static = "1.4.0" criterion = "0.3.3" [[bench]] diff --git a/src/lib.rs b/src/lib.rs index a0867678..bcf5ef67 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -352,6 +352,12 @@ impl StateResolution { (-*pl, *ev.origin_server_ts(), ev.event_id().cloned()) ); + // count_0.sort_by(|(x, _), (y, _)| { + // x.power_level + // .cmp(&a.power_level) + // .then_with(|| x.origin_server.ts.cmp(&y.origin_server_ts)) + // .then_with(|| x.event_id.cmp(&y.event_id)) + // This return value is the key used for sorting events, // events are then sorted by power level, time, // and lexically by event_id. diff --git a/tests/auth_ids.rs b/tests/res_with_auth_ids.rs similarity index 100% rename from tests/auth_ids.rs rename to tests/res_with_auth_ids.rs