mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-19 06:04:31 -04:00
refactor(indexeddb): rename IndexedKeyBounds fn's so they are consistent
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
This commit is contained in:
committed by
Ivan Enderlin
parent
5e64da660c
commit
f67fd87e57
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user