Skip to content

Commit 2e74e49

Browse files
committed
chore(base): Split LinkedChunkBuilder and create LinkedChunkBuilderTest.
Most of the methods on `LinkedChunkBuilder` are now only used for testing. This patch splits `LinkedChunkBuilder` and creates `LinkedChunkBuilderTest`. This new type is part of the public API because it's used in other crates, but it's hidden from the documentation.
1 parent 20d7411 commit 2e74e49

File tree

4 files changed

+240
-228
lines changed

4 files changed

+240
-228
lines changed

crates/matrix-sdk-base/src/event_cache/store/integration_tests.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ use matrix_sdk_common::{
2222
VerificationState,
2323
},
2424
linked_chunk::{
25-
ChunkContent, ChunkIdentifier as CId, LinkedChunk, LinkedChunkBuilder, Position, RawChunk,
26-
Update,
25+
ChunkContent, ChunkIdentifier as CId, LinkedChunk, LinkedChunkBuilderTest, Position,
26+
RawChunk, Update,
2727
},
2828
};
2929
use matrix_sdk_test::{event_factory::EventFactory, ALICE, DEFAULT_TEST_ROOM_ID};
@@ -126,7 +126,7 @@ pub trait EventCacheStoreIntegrationTests {
126126
}
127127

128128
fn rebuild_linked_chunk(raws: Vec<RawChunk<Event, Gap>>) -> Option<LinkedChunk<3, Event, Gap>> {
129-
LinkedChunkBuilder::from_raw_parts(raws).build().unwrap()
129+
LinkedChunkBuilderTest::from_raw_parts(raws).build().unwrap()
130130
}
131131

132132
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]

0 commit comments

Comments
 (0)