Skip to content

Commit

Permalink
fixup! Split out the receive_sync_changes method into a helper
Browse files Browse the repository at this point in the history
  • Loading branch information
poljar committed Aug 9, 2023
1 parent 09ba820 commit 404ce56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/matrix-sdk-crypto/src/machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,7 @@ impl OlmMachine {
&self,
sync_changes: EncryptionSyncChanges<'_>,
) -> OlmResult<(Vec<Raw<AnyToDeviceEvent>>, Vec<RoomKeyInfo>)> {
let (events, changes) = self.receive_sync_changes_helper(sync_changes).await?;
let (events, changes) = self.preprocess_sync_changes(sync_changes).await?;

// Technically save_changes also does the same work, so if it's slow we could
// refactor this to do it only once.
Expand All @@ -1161,7 +1161,7 @@ impl OlmMachine {
Ok((events, room_key_updates))
}

pub(crate) async fn receive_sync_changes_helper(
pub(crate) async fn preprocess_sync_changes(
&self,
sync_changes: EncryptionSyncChanges<'_>,
) -> OlmResult<(Vec<Raw<AnyToDeviceEvent>>, Changes)> {
Expand Down

0 comments on commit 404ce56

Please sign in to comment.