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`.
This commit is contained in:
Ivan Enderlin
2025-01-31 11:43:57 +01:00
committed by Damir Jelić
parent 5049d1a3b6
commit 3f40ad83a5

View File

@@ -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::<Vec<_>>();
let first_event_pos = room_events.events().next().map(|(item_pos, _)| item_pos);