state-res: Refactor lexicographical_topological_sort

Gets rid of unnecessary copying and makes things more explicit by using
a struct with named fields instead of a tuple for tie breaking.

Co-authored-by: Jonathan de Jong <jonathan@automatia.nl>
This commit is contained in:
Jonas Platte
2021-11-26 16:07:30 +01:00
parent 6c48926649
commit 9ed75241a6
4 changed files with 37 additions and 22 deletions

View File

@@ -4,6 +4,8 @@ Breaking changes:
* Remove some trait methods from `Event`
* Update `Event::content` signature to return `&RawJsonValue` instead of `&JsonValue`
* The `key_fn` in `lexicographical_topological_sort` has removed the event ID from its return type
and changed to expect just the power level, not the negated power level
# 0.4.1