From a11c27e7e1612510daabb376ed884a1695bfdc69 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Thu, 22 Sep 2022 11:48:48 +0200 Subject: [PATCH] state-res: Update docs --- crates/ruma-state-res/README.md | 4 ++-- crates/ruma-state-res/src/lib.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/ruma-state-res/README.md b/crates/ruma-state-res/README.md index 8c4c928d..a6a84d03 100644 --- a/crates/ruma-state-res/README.md +++ b/crates/ruma-state-res/README.md @@ -13,7 +13,7 @@ pub trait Event { } /// A mapping of event type and state_key to some value `T`, usually an `EventId`. -pub type StateMap = BTreeMap<(EventType, Option), T>; +pub type StateMap = BTreeMap<(StateEventType, Option), T>; /// A mapping of `EventId` to `T`, usually a `OriginalStateEvent`. pub type EventMap = BTreeMap; @@ -40,6 +40,6 @@ impl StateResolution { -The `StateStore` trait is an abstraction around what ever database your server (or maybe even client) uses to store __P__[]()ersistant __D__[]()ata __U__[]()nits. +The `StateStore` trait is an abstraction around what ever database your server (or maybe even client) uses to store **P**ersistent **D**ata **U**nits. We use `ruma`s types when deserializing any PDU or it's contents which helps avoid a lot of type checking logic [synapse](https://github.com/matrix-org/synapse) must do while authenticating event chains. diff --git a/crates/ruma-state-res/src/lib.rs b/crates/ruma-state-res/src/lib.rs index 9443f509..a0d86365 100644 --- a/crates/ruma-state-res/src/lib.rs +++ b/crates/ruma-state-res/src/lib.rs @@ -158,9 +158,9 @@ where /// /// The return tuple looks like `(unconflicted, conflicted)`. /// -/// State is determined to be conflicting if for the given key (EventType, StateKey) there is not -/// exactly one eventId. This includes missing events, if one state_set includes an event that none -/// of the other have this is a conflicting event. +/// State is determined to be conflicting if for the given key (StateEventType, StateKey) there is +/// not exactly one event ID. This includes missing events, if one state_set includes an event that +/// none of the other have this is a conflicting event. fn separate<'a, Id>( state_sets_iter: impl Iterator> + Clone, ) -> (StateMap, StateMap>)