Skip to content

Commit b5224aa

Browse files
committed
test(sdk): Test the RoomEvents' methods.
This patch adds unit tests for the `RoomEvents`' methods.
1 parent f9830af commit b5224aa

File tree

2 files changed

+392
-0
lines changed

2 files changed

+392
-0
lines changed

crates/matrix-sdk/src/event_cache/linked_chunk/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -852,6 +852,12 @@ impl ChunkIdentifierGenerator {
852852
#[repr(transparent)]
853853
pub struct ChunkIdentifier(u64);
854854

855+
impl PartialEq<u64> for ChunkIdentifier {
856+
fn eq(&self, other: &u64) -> bool {
857+
self.0 == *other
858+
}
859+
}
860+
855861
/// The position of something inside a [`Chunk`].
856862
///
857863
/// It's a pair of a chunk position and an item index.

0 commit comments

Comments
 (0)