From 3f40ad83a5f4ee39a9970fea12aa2498ee5cc178 Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Fri, 31 Jan 2025 11:43:57 +0100 Subject: [PATCH] chore(sdk): Remove a useless type conversion. This patch removes a useless type conversion. The iterator produces `TimelineEvent`, so mapping to `TimelineEvent::from` is useless: we map `TimelineEvent` to `TimelineEvent`. --- crates/matrix-sdk/src/event_cache/pagination.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/matrix-sdk/src/event_cache/pagination.rs b/crates/matrix-sdk/src/event_cache/pagination.rs index 29c402292..ac6cf305b 100644 --- a/crates/matrix-sdk/src/event_cache/pagination.rs +++ b/crates/matrix-sdk/src/event_cache/pagination.rs @@ -17,7 +17,7 @@ use std::{future::Future, ops::ControlFlow, sync::Arc, time::Duration}; use eyeball::Subscriber; -use matrix_sdk_base::{deserialized_responses::TimelineEvent, timeout::timeout}; +use matrix_sdk_base::timeout::timeout; use matrix_sdk_common::linked_chunk::ChunkContent; use tracing::{debug, instrument, trace}; @@ -180,7 +180,6 @@ impl RoomPagination { // (backward). The `RoomEvents` API expects the first event to be the oldest. .rev() .cloned() - .map(TimelineEvent::from) .collect::>(); let first_event_pos = room_events.events().next().map(|(item_pos, _)| item_pos);