File tree 1 file changed +7
-7
lines changed
crates/matrix-sdk/src/event_cache/linked_chunk
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -359,23 +359,23 @@ impl UpdateToVectorDiff {
359
359
todo ! ( )
360
360
}
361
361
362
- Update :: DetachLastItems { at } => {
363
- let expected_chunk_identifier = at . chunk_identifier ( ) ;
364
- let new_length = at . index ( ) ;
362
+ Update :: DetachLastItems { at : position } => {
363
+ let expected_chunk_identifier = position . chunk_identifier ( ) ;
364
+ let new_length = position . index ( ) ;
365
365
366
- let length = self
366
+ let chunk_length = self
367
367
. chunks
368
368
. iter_mut ( )
369
- . find_map ( |( chunk_identifier, length ) | {
370
- ( * chunk_identifier == expected_chunk_identifier) . then_some ( length )
369
+ . find_map ( |( chunk_identifier, chunk_length ) | {
370
+ ( * chunk_identifier == expected_chunk_identifier) . then_some ( chunk_length )
371
371
} )
372
372
// SAFETY: Assuming `LinkedChunk` and `ObservableUpdates` are not buggy, and
373
373
// assuming `Self::chunks` is correctly initialized, it is not possible to
374
374
// detach items from a chunk that does not exist. If this predicate fails,
375
375
// it means `LinkedChunk` or `ObservableUpdates` contain a bug.
376
376
. expect ( "Detach last items: The chunk is not found" ) ;
377
377
378
- * length = new_length;
378
+ * chunk_length = new_length;
379
379
}
380
380
381
381
Update :: StartReattachItems => {
You can’t perform that action at this time.
0 commit comments