File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -685,7 +685,7 @@ impl RoomEventCacheInner {
685
685
// (backward). The `RoomEvents` API expects the first event to be the oldest.
686
686
. rev ( )
687
687
. cloned ( )
688
- . map ( |timeline_event| SyncTimelineEvent :: from ( timeline_event ) ) ;
688
+ . map ( SyncTimelineEvent :: from) ;
689
689
690
690
// There is a `token`/gap, let's replace it by new events!
691
691
if let Some ( gap_identifier) = gap_identifier {
@@ -755,7 +755,7 @@ impl RoomEventCacheInner {
755
755
max_wait : Option < Duration > ,
756
756
) -> Result < Option < PaginationToken > > {
757
757
// Optimistically try to return the backpagination token immediately.
758
- fn get_oldest ( room_events : RwLockReadGuard < RoomEvents > ) -> Option < PaginationToken > {
758
+ fn get_oldest ( room_events : RwLockReadGuard < ' _ , RoomEvents > ) -> Option < PaginationToken > {
759
759
room_events. chunks ( ) . find_map ( |chunk| match chunk. content ( ) {
760
760
ChunkContent :: Gap ( gap) => Some ( gap. prev_token . clone ( ) ) ,
761
761
ChunkContent :: Items ( ..) => None ,
Original file line number Diff line number Diff line change @@ -509,11 +509,7 @@ async fn test_reset_while_backpaginating() {
509
509
510
510
let rec = room_event_cache. clone ( ) ;
511
511
let first_token_clone = first_token. clone ( ) ;
512
- let backpagination = spawn ( async move {
513
- let ret = rec. backpaginate ( 20 , first_token_clone) . await ;
514
-
515
- ret
516
- } ) ;
512
+ let backpagination = spawn ( async move { rec. backpaginate ( 20 , first_token_clone) . await } ) ;
517
513
518
514
// Receive the sync response (which clears the timeline).
519
515
mock_sync ( & server, sync_response_body, None ) . await ;
You can’t perform that action at this time.
0 commit comments