diff --git a/crates/matrix-sdk-ui/src/timeline/event_item/mod.rs b/crates/matrix-sdk-ui/src/timeline/event_item/mod.rs index 291b6f4760c..57debe06999 100644 --- a/crates/matrix-sdk-ui/src/timeline/event_item/mod.rs +++ b/crates/matrix-sdk-ui/src/timeline/event_item/mod.rs @@ -115,23 +115,6 @@ impl From for TimelineEventItemId { } } -// TODO remove those two -impl From for TimelineEventItemId { - fn from(value: String) -> Self { - value.as_str().into() - } -} - -impl From<&str> for TimelineEventItemId { - fn from(value: &str) -> Self { - if let Ok(event_id) = EventId::parse(value) { - TimelineEventItemId::EventId(event_id) - } else { - TimelineEventItemId::TransactionId(value.into()) - } - } -} - /// An handle that usually allows to perform an action on a timeline event. /// /// If the item represents a remote item, then the event id is usually @@ -762,7 +745,7 @@ mod tests { }; use super::{EventTimelineItem, Profile}; - use crate::timeline::{TimelineDetails, TimelineEventItemId}; + use crate::timeline::TimelineDetails; #[async_test] async fn test_latest_message_event_can_be_wrapped_as_a_timeline_item() { @@ -987,20 +970,6 @@ mod tests { ); } - #[test] - fn test_raw_event_id_into_timeline_event_item_id_gets_event_id() { - let raw_id = "$123:example.com"; - let id: TimelineEventItemId = raw_id.into(); - assert_matches!(id, TimelineEventItemId::EventId(_)); - } - - #[test] - fn test_raw_str_into_timeline_event_item_id_gets_transaction_id() { - let raw_id = "something something"; - let id: TimelineEventItemId = raw_id.into(); - assert_matches!(id, TimelineEventItemId::TransactionId(_)); - } - fn member_event( room_id: &RoomId, user_id: &UserId,