File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed
crates/matrix-sdk/src/event_cache/room Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -912,21 +912,15 @@ mod private {
912912 return Ok ( LoadMoreEventsBackwardsOutcome :: Gap { prev_token : Some ( prev_token) } ) ;
913913 }
914914
915- // Because `first_chunk` is `not `Send`, get this information before the
916- // `.await` point, so that this `Future` can implement `Send`.
917- let first_chunk_identifier = self
918- . room_linked_chunk
919- . chunks ( )
920- . next ( )
921- . expect ( "a linked chunk is never empty" )
922- . identifier ( ) ;
923-
924915 let store = self . store . lock ( ) . await ?;
925916
917+ let prev_first_chunk =
918+ self . room_linked_chunk . chunks ( ) . next ( ) . expect ( "a linked chunk is never empty" ) ;
919+
926920 // The first chunk is not a gap, we can load its previous chunk.
927921 let linked_chunk_id = LinkedChunkId :: Room ( & self . room ) ;
928922 let new_first_chunk = match store
929- . load_previous_chunk ( linked_chunk_id, first_chunk_identifier )
923+ . load_previous_chunk ( linked_chunk_id, prev_first_chunk . identifier ( ) )
930924 . await
931925 {
932926 Ok ( Some ( new_first_chunk) ) => {
You can’t perform that action at this time.
0 commit comments