Skip to content

Commit

Permalink
Updates after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanfrey committed Oct 16, 2020
1 parent e6e4138 commit fad0402
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/storage-plus/src/indexed_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,20 +135,21 @@ where
}

// short-cut for simple keys, rather than .prefix(()).range(...)
impl<'a, 'x, K, T, S> IndexedMap<'a, 'x, K, T, S>
impl<'a, K, T, S, I> IndexedMap<'a, K, T, S, I>
where
K: PrimaryKey<'a>,
T: Serialize + DeserializeOwned + Clone + 'x,
S: Storage + 'x,
T: Serialize + DeserializeOwned + Clone,
S: Storage,
I: IndexList<S, T>,
K::Prefix: EmptyPrefix,
{
// I would prefer not to copy code from Prefix, but no other way
// with lifetimes (create Prefix inside function and return ref = no no)
pub fn range<'c>(
&self,
store: &'c S,
min: Bound<'_>,
max: Bound<'_>,
min: Option<Bound>,
max: Option<Bound>,
order: cosmwasm_std::Order,
) -> Box<dyn Iterator<Item = StdResult<cosmwasm_std::KV<T>>> + 'c>
where
Expand Down

0 comments on commit fad0402

Please sign in to comment.