StateResolution's methods take &self now + more clean up
This commit is contained in:
parent
8a9f15e01f
commit
185047918a
@ -15,7 +15,6 @@ repository = "https://github.com/ruma/state-res"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
itertools = "0.9.0"
|
itertools = "0.9.0"
|
||||||
js_int = "0.1.8"
|
js_int = "0.1.8"
|
||||||
petgraph = "0.5.1"
|
|
||||||
serde = { version = "1.0.114", features = ["derive"] }
|
serde = { version = "1.0.114", features = ["derive"] }
|
||||||
serde_json = "1.0.56"
|
serde_json = "1.0.56"
|
||||||
tracing = "0.1.16"
|
tracing = "0.1.16"
|
||||||
@ -29,7 +28,6 @@ branch = "pdu-deserialize"
|
|||||||
features = ["client-api", "federation-api", "appservice-api"]
|
features = ["client-api", "federation-api", "appservice-api"]
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
lazy_static = "1.4.0"
|
|
||||||
criterion = "0.3.3"
|
criterion = "0.3.3"
|
||||||
|
|
||||||
[[bench]]
|
[[bench]]
|
||||||
|
@ -352,6 +352,12 @@ impl StateResolution {
|
|||||||
(-*pl, *ev.origin_server_ts(), ev.event_id().cloned())
|
(-*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,
|
// This return value is the key used for sorting events,
|
||||||
// events are then sorted by power level, time,
|
// events are then sorted by power level, time,
|
||||||
// and lexically by event_id.
|
// and lexically by event_id.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user