Update readme example Option<String> -> String

This commit is contained in:
Devin Ragotzy 2020-12-13 09:12:14 -05:00
parent c6a108631d
commit dca71f76ee
2 changed files with 1 additions and 5 deletions

View File

@ -10,7 +10,7 @@ struct StateEvent {
}
/// A mapping of event type and state_key to some value `T`, usually an `EventId`.
pub type StateMap<T> = BTreeMap<(EventType, Option<String>), T>;
pub type StateMap<T> = BTreeMap<(EventType, String), T>;
/// A mapping of `EventId` to `T`, usually a `StateEvent`.
pub type EventMap<T> = BTreeMap<EventId, T>;

View File

@ -429,10 +429,6 @@ fn do_check(
// we have to update our store, an actual user of this lib would
// be giving us state from a DB.
//
// TODO
// TODO we need to convert the `StateResolution::resolve` to use the event_map
// because the user of this crate cannot update their DB's state.
store.0.insert(ev_id.clone(), Arc::clone(&event));
state_at_event.insert(node, state_after);