Implement PrimaryKey for &Addr by removing unused parse_key#264
Implement PrimaryKey for &Addr by removing unused parse_key#264webmaster128 wants to merge 3 commits intoupdate-cosmwasm-std-0.14.0-beta2from
Conversation
maurolacy
left a comment
There was a problem hiding this comment.
I like the simplicity of this. I think parse_key is not used because we're implementing parsing of keys when we need it using custom helper functions.
There is an open issue to make use of It does simplify things to remove the call. Let's discuss whether we want to make #198 impossible first. If that is fine, let's do this approach. Otherwise, let's do the &K approach, which is quite nice |
My understanding is that #198 can be done independently of
I agree #265 looks like the way to go. If we're OK with tolerating some syntax issues / constructs (mostly in test code), I would say, let's go for it. |
The trait
PrimaryKeyputs a lot of requirements on the type implementing it. It requires zero-copy serialization and zero-copy deserialization.However, deserializing the bytes into the key type is never used. If we remove it, we can easily implemement PrimaryKey for &Addr.
Do not merge as is. Target branch is a copy of the fork from #260.