From 975626a4f8d3e98d2922d2a3cc428ff5fbd6662d Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Wed, 16 Nov 2022 13:32:36 +0100 Subject: [PATCH] refactor(common)!: Remove unused TimelineSlice type --- .../src/deserialized_responses.rs | 33 ------------------- 1 file changed, 33 deletions(-) diff --git a/crates/matrix-sdk-common/src/deserialized_responses.rs b/crates/matrix-sdk-common/src/deserialized_responses.rs index e573b59dd..629e8aa4a 100644 --- a/crates/matrix-sdk-common/src/deserialized_responses.rs +++ b/crates/matrix-sdk-common/src/deserialized_responses.rs @@ -263,39 +263,6 @@ impl Timeline { } } -/// A slice of the timeline in the room. -#[derive(Clone, Debug, Default, Deserialize, Serialize)] -pub struct TimelineSlice { - /// The `next_batch` or `from` token used to obtain this slice - pub start: String, - - /// The `prev_batch` or `to` token used to obtain this slice - /// If `None` this `TimelineSlice` is the beginning of the room - pub end: Option, - - /// Whether the number of events returned for this slice was limited - /// by a `limit`-filter when requesting - pub limited: bool, - - /// A list of events. - pub events: Vec, - - /// Whether this is a timeline slice obtained from a `SyncResponse` - pub sync: bool, -} - -impl TimelineSlice { - pub fn new( - events: Vec, - start: String, - end: Option, - limited: bool, - sync: bool, - ) -> Self { - Self { start, end, events, limited, sync } - } -} - /// Wrapper around both MemberEvent-Types #[allow(clippy::large_enum_variant)] #[derive(Clone, Debug, Deserialize, Serialize)]