Skip to content

Commit

Permalink
Merge pull request CosmWasm#655 from CosmWasm/fix/prefix-bound-types
Browse files Browse the repository at this point in the history
Fix missing prefix bound types
  • Loading branch information
maurolacy authored Feb 14, 2022
2 parents 278552d + ea6601e commit 4c4736e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 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
4 changes: 2 additions & 2 deletions packages/storage-plus/src/indexes/multi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ where
T: Serialize + DeserializeOwned + Clone,
IK: PrimaryKey<'a> + Prefixer<'a>,
{
pub fn prefix(&self, p: IK) -> Prefix<PK, T> {
pub fn prefix(&self, p: IK) -> Prefix<PK, T, PK> {
Prefix::with_deserialization_functions(
self.idx_namespace,
&p.prefix(),
Expand All @@ -260,7 +260,7 @@ where
)
}

pub fn sub_prefix(&self, p: IK::Prefix) -> Prefix<PK, T> {
pub fn sub_prefix(&self, p: IK::Prefix) -> Prefix<PK, T, (IK::Suffix, PK)> {
Prefix::with_deserialization_functions(
self.idx_namespace,
&p.prefix(),
Expand Down

0 comments on commit 4c4736e

Please sign in to comment.