-
Notifications
You must be signed in to change notification settings - Fork 362
Open
Description
In EventLinkedChunk::reset, the OrderTracker isn't reset properly:
matrix-rust-sdk/crates/matrix-sdk/src/event_cache/room/events.rs
Lines 78 to 84 in aa79e34
| /// Clear all events. | |
| /// | |
| /// All events, all gaps, everything is dropped, move into the void, into | |
| /// the ether, forever. | |
| pub fn reset(&mut self) { | |
| self.chunks.clear(); | |
| } |
which then later can create an error in linked_chunk::AsVector:
matrix-rust-sdk/crates/matrix-sdk-common/src/linked_chunk/as_vector.rs
Lines 492 to 499 in aa79e34
| // Chunk has not been found. | |
| ControlFlow::Continue(..) => { | |
| // SAFETY: Assuming `LinkedChunk` and `ObservableUpdates` are not buggy, and | |
| // assuming `Self::chunks` is correctly initialized, it is not possible to work | |
| // on a chunk that does not exist. If this predicate fails, it means | |
| // `LinkedChunk` or `ObservableUpdates` contain a bug. | |
| panic!("The chunk is not found"); | |
| } |
Metadata
Metadata
Assignees
Labels
No labels