Skip to content

Commit

Permalink
Fix type annotations for IndexedMap/IndexedSnapshotMap prefixes
Browse files Browse the repository at this point in the history
  • Loading branch information
maurolacy committed Feb 11, 2022
1 parent eb76bd2 commit 8097aac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/storage-plus/src/indexed_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,11 @@ where
K: PrimaryKey<'a>,
I: IndexList<T>,
{
pub fn sub_prefix(&self, p: K::SubPrefix) -> Prefix<K::SuperSuffix, T> {
pub fn sub_prefix(&self, p: K::SubPrefix) -> Prefix<K::SuperSuffix, T, K::SuperSuffix> {
Prefix::new(self.pk_namespace, &p.prefix())
}

pub fn prefix(&self, p: K::Prefix) -> Prefix<K::Suffix, T> {
pub fn prefix(&self, p: K::Prefix) -> Prefix<K::Suffix, T, K::Suffix> {
Prefix::new(self.pk_namespace, &p.prefix())
}
}
Expand Down
4 changes: 2 additions & 2 deletions packages/storage-plus/src/indexed_snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,11 @@ where
K: PrimaryKey<'a>,
I: IndexList<T>,
{
pub fn sub_prefix(&self, p: K::SubPrefix) -> Prefix<K::SuperSuffix, T> {
pub fn sub_prefix(&self, p: K::SubPrefix) -> Prefix<K::SuperSuffix, T, K::SuperSuffix> {
Prefix::new(self.pk_namespace, &p.prefix())
}

pub fn prefix(&self, p: K::Prefix) -> Prefix<K::Suffix, T> {
pub fn prefix(&self, p: K::Prefix) -> Prefix<K::Suffix, T, K::Suffix> {
Prefix::new(self.pk_namespace, &p.prefix())
}
}
Expand Down

0 comments on commit 8097aac

Please sign in to comment.