From 24266fe2545bcec9930c14c97ddbb071aaac3dd9 Mon Sep 17 00:00:00 2001 From: Benjamin Kampmann Date: Tue, 12 Apr 2022 19:59:20 +0200 Subject: [PATCH] fixing ranges --- crates/matrix-sdk-indexeddb/src/safe_encode.rs | 1 - crates/matrix-sdk-indexeddb/src/state_store.rs | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/matrix-sdk-indexeddb/src/safe_encode.rs b/crates/matrix-sdk-indexeddb/src/safe_encode.rs index 18f1bbe04..c8837c908 100644 --- a/crates/matrix-sdk-indexeddb/src/safe_encode.rs +++ b/crates/matrix-sdk-indexeddb/src/safe_encode.rs @@ -97,7 +97,6 @@ where store_cipher.hash_key(table_name, self.1.as_encoded_string().as_bytes()), STANDARD_NO_PAD ), - KEY_SEPARATOR ].concat() } } diff --git a/crates/matrix-sdk-indexeddb/src/state_store.rs b/crates/matrix-sdk-indexeddb/src/state_store.rs index 07664c2e4..62c855625 100644 --- a/crates/matrix-sdk-indexeddb/src/state_store.rs +++ b/crates/matrix-sdk-indexeddb/src/state_store.rs @@ -751,7 +751,7 @@ impl IndexeddbStore { self.inner .transaction_on_one_with_mode(KEYS::ROOM_STATE, IdbTransactionMode::Readonly)? .object_store(KEYS::ROOM_STATE)? - .get(&self.encode_key(KEYS::ROOM_STATE, (room_id, &event_type, state_key)))? + .get(&self.encode_key(KEYS::ROOM_STATE, (room_id, event_type, state_key)))? .await? .map(|f| self.deserialize_event(f)) .transpose() @@ -762,7 +762,7 @@ impl IndexeddbStore { room_id: &RoomId, event_type: StateEventType, ) -> Result>> { - let range = self.encode_to_range(KEYS::ROOM_STATE, (room_id, &event_type))?; + let range = self.encode_to_range(KEYS::ROOM_STATE, (room_id, event_type))?; Ok(self .inner .transaction_on_one_with_mode(KEYS::ROOM_STATE, IdbTransactionMode::Readonly)?