You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for Storage, Api, Querier, we should stick with dyn, as that is what we pass into Deps and we have no real need for more details. For the other, it can be useful to get the original types when setting up test code.
Basically I very much like this approach. Two things which I would already note:
If you don't have dyn Traits, you nevermore need boxing - just keep stuff by ownership. You need box to handle unsized types, but there is no need to accept unsized generics.
I really don't like trait bounds in types. They doesn't give anything, but propagates quickly (if I use the type anywhere, I immediately have to add bounds - even if I don't need to use impl of it). Basically I find it way better to add bounds only to impl block (where you have to add it anyway). There is an argumentation that maybe at some point in future implied bounds would be there, but it doesn't look like it would happen anytime soon if ever.
for Storage, Api, Querier, we should stick with dyn, as that is what we pass into Deps and we have no real need for more details. For the other, it can be useful to get the original types when setting up test code.
I am talking about:
https://github.com/CosmWasm/cw-plus/blob/mt-msg-handling/packages/multi-test/src/app.rs#L254-L258
I would propose something like the follow:
It would require some changes to the builder pattern (but we have a similar setup in ContractWrapper where we change types during the builder.
The text was updated successfully, but these errors were encountered: