Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve trait bounds over iterators #8

Open
maurolacy opened this issue Mar 27, 2022 · 0 comments
Open

Improve trait bounds over iterators #8

maurolacy opened this issue Mar 27, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@maurolacy
Copy link
Contributor

maurolacy commented Mar 27, 2022

Currently there's a mess of trait bounds over the different containers. Raw iterators don't need KeyDeserialize, by example, and they usually have that restriction.

Do a full analysis of the required trait bounds for raw and typed iterators, for all the iterable containers:

  • Map.
  • SnapshotMap.
  • IndexedMap.
  • IndexedSnapshotMap.

Extend that to the indexes:

  • UniqueIndex.
  • MultiIndex.

Analyse also the trait bounds over all the public methods of these containers, so that they don't list extra / unneeded bounds. key() by example, requires PrimaryKey but not KeyDeserializable.

Also, the Bounder trait bound is optional. It can be imported through an use clause when needed, but don't need to be listed as a bound over the containers' methods (see CosmWasm/cw-plus#692).

@uint uint transferred this issue from CosmWasm/cw-plus Oct 17, 2022
@uint uint added the enhancement New feature or request label Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants