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

Storage-plus: See if we can simplify PkOwned to Vec<u8> #199

Closed
ethanfrey opened this issue Dec 21, 2020 · 2 comments · Fixed by #290
Closed

Storage-plus: See if we can simplify PkOwned to Vec<u8> #199

ethanfrey opened this issue Dec 21, 2020 · 2 comments · Fixed by #290

Comments

@ethanfrey
Copy link
Member

Is there a reason why we don't use that directly like &[u8]. Maybe an oversight when I wrote this API?

Then we can just return Vec<u8> than forcing wrapping.

@ethanfrey ethanfrey added this to To do in Contract development via automation Dec 21, 2020
@maurolacy
Copy link
Contributor

maurolacy commented Mar 4, 2021

Using &[u8] or &str directly might be possible, but will require to carefully track and fix lifetime conficts.

A simpler way seems to be implementing needed traits (PrimaryKey, Prefixer, probably others) directly for Vec[u8], and remove PkOwned entirely.

@maurolacy
Copy link
Contributor

Created #233 to track / fix the lifetimes issue.

@maurolacy maurolacy self-assigned this Apr 29, 2021
@maurolacy maurolacy moved this from To do to In progress in Contract development Apr 29, 2021
Contract development automation moved this from In progress to Done May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants