-
Notifications
You must be signed in to change notification settings - Fork 350
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
Fix lifetime of MultiIndex/UniqueIndex to be able to accept &str #232
Labels
Milestone
Comments
Merged
let's try to fix this if we can. if it is too painful, let's close it and accept the status quo. |
Will take another stab at this. |
This seems like a huge amount of work for marginal return. Closing for now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is an index function that takes
K: PrimaryKey => Vec<u8>
more or less. And indexes wrap this allowing a number of functions.Currently this only works for static lifetimes (eg. PkOwned, String). It should be possible to support slices (
&str
,&[u8]
) which will not just avoid a copy, but make the usability much nicer, as many types auto-deref to one of those slices.Investigate what is needed to make this work for UniqueIndex (the simpler case), and if you can get a Proof of Concept to compile, then we decide if it makes sense to continue on this path.
The text was updated successfully, but these errors were encountered: