Skip to content

Commit 2e598c0

Browse files
mgoldenbergHywan
authored andcommitted
refactor(indexeddb): remove unnecessary fn IndexedEventRelationKey::with_related_event_id
Signed-off-by: Michael Goldenberg <[email protected]>
1 parent 5a3ef30 commit 2e598c0

File tree

1 file changed

+0
-17
lines changed
  • crates/matrix-sdk-indexeddb/src/event_cache_store/serializer

1 file changed

+0
-17
lines changed

crates/matrix-sdk-indexeddb/src/event_cache_store/serializer/types.rs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -528,23 +528,6 @@ pub type IndexedEventPositionIndex = usize;
528528
#[derive(Debug, Serialize, Deserialize)]
529529
pub struct IndexedEventRelationKey(IndexedRoomId, IndexedEventId, IndexedRelationType);
530530

531-
impl IndexedEventRelationKey {
532-
/// Returns an identical key, but with the related event field updated to
533-
/// the given related event. This is helpful when searching for all
534-
/// events which are related to the given event.
535-
pub fn with_related_event_id(
536-
&self,
537-
related_event_id: &EventId,
538-
serializer: &IndexeddbSerializer,
539-
) -> Self {
540-
let room_id = self.0.clone();
541-
let related_event_id =
542-
serializer.encode_key_as_string(keys::EVENTS_RELATION_RELATED_EVENTS, related_event_id);
543-
let relation_type = self.2.clone();
544-
Self(room_id, related_event_id, relation_type)
545-
}
546-
}
547-
548531
impl IndexedKey<Event> for IndexedEventRelationKey {
549532
const INDEX: Option<&'static str> = Some(keys::EVENTS_RELATION);
550533

0 commit comments

Comments
 (0)