CosmWasm / cw-storage-plus

Storage abstractions for CosmWasm smart contracts
Apache License 2.0
37 stars 27 forks source link

Make a mismatch of PK in an IndexedMap impossible (alt) #91

Open uint opened 3 weeks ago

uint commented 3 weeks ago

Closes #83

This PR uses assoc types instead of generic params.

Seems this makes the macro easy to fix too. The macro-expanded code infers the PK type from the first field's type (<FirstFieldType as Index<T>>::PK).

API-breaking!