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
Assignees

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.

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants