simplify get_pdu() interface; eliminate unconditional Arc
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
58be22e695
commit
6175e72f1c
16 changed files with 51 additions and 52 deletions
|
@ -242,12 +242,7 @@ impl Service {
|
|||
/// Returns the pdu.
|
||||
///
|
||||
/// Checks the `eventid_outlierpdu` Tree if not found in the timeline.
|
||||
pub async fn get_pdu(&self, event_id: &EventId) -> Result<Arc<PduEvent>> { self.db.get_pdu(event_id).await }
|
||||
|
||||
/// Returns the pdu.
|
||||
///
|
||||
/// Checks the `eventid_outlierpdu` Tree if not found in the timeline.
|
||||
pub async fn get_pdu_owned(&self, event_id: &EventId) -> Result<PduEvent> { self.db.get_pdu_owned(event_id).await }
|
||||
pub async fn get_pdu(&self, event_id: &EventId) -> Result<PduEvent> { self.db.get_pdu(event_id).await }
|
||||
|
||||
/// Checks if pdu exists
|
||||
///
|
||||
|
@ -327,11 +322,11 @@ impl Service {
|
|||
);
|
||||
unsigned.insert(
|
||||
String::from("prev_sender"),
|
||||
CanonicalJsonValue::String(prev_state.sender.clone().to_string()),
|
||||
CanonicalJsonValue::String(prev_state.sender.to_string()),
|
||||
);
|
||||
unsigned.insert(
|
||||
String::from("replaces_state"),
|
||||
CanonicalJsonValue::String(prev_state.event_id.clone().to_string()),
|
||||
CanonicalJsonValue::String(prev_state.event_id.to_string()),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue