refactor(indexeddb): rename IndexedKeyBounds fn's so they are consistent

Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
This commit is contained in:
Michael Goldenberg
2025-06-23 10:29:17 -04:00
committed by Ivan Enderlin
parent 5e64da660c
commit f67fd87e57
2 changed files with 6 additions and 6 deletions

View File

@@ -98,8 +98,8 @@ impl IndexeddbEventCacheStoreSerializer {
T: Indexed,
K: IndexedKeyBounds<T> + Serialize,
{
let lower = serde_wasm_bindgen::to_value(&K::encode_lower(room_id, &self.inner))?;
let upper = serde_wasm_bindgen::to_value(&K::encode_upper(room_id, &self.inner))?;
let lower = serde_wasm_bindgen::to_value(&K::lower_key(room_id, &self.inner))?;
let upper = serde_wasm_bindgen::to_value(&K::upper_key(room_id, &self.inner))?;
IdbKeyRange::bound(&lower, &upper).map_err(Into::into)
}

View File

@@ -71,8 +71,8 @@ pub trait IndexedKeyBounds<T: Indexed>: IndexedKey<T> {
/// Constructs the lower bound of the key components.
fn lower_key_components() -> Self::KeyComponents;
/// Encodes the lower bound of the key.
fn encode_lower(room_id: &RoomId, serializer: &IndexeddbSerializer) -> Self
/// Constructs the lower bound of the key.
fn lower_key(room_id: &RoomId, serializer: &IndexeddbSerializer) -> Self
where
Self: Sized,
{
@@ -82,8 +82,8 @@ pub trait IndexedKeyBounds<T: Indexed>: IndexedKey<T> {
/// Constructs the upper bound of the key components.
fn upper_key_components() -> Self::KeyComponents;
/// Encodes the upper bound of the key.
fn encode_upper(room_id: &RoomId, serializer: &IndexeddbSerializer) -> Self
/// Constructs the upper bound of the key.
fn upper_key(room_id: &RoomId, serializer: &IndexeddbSerializer) -> Self
where
Self: Sized,
{