-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
Implications of Arc<K>: Borrow<Q>
#166
Comments
I found a solution for If it goes well, I will publish Moka v0.9.1 with the solution. |
I am closing this issue.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Discussed in #163
Originally posted by JayKickliter July 9, 2022
For my particular use case I'm finding
moka::sync::Cache
requirement ofArc<K>: Borrow<Q>
very restrictive, as my keytype is somewhat expensive to create. Is this an absolute requirement for this kind of cache or an implementation detail?Expected behavior
Using
HashMap
as an example, I'd expect to be able to querey using a&[u8]
when the key type isVec<u8>
.Failing example, simplified
EDIT: I now wonder if this could be considered a bug after noticing the following.
This also seems to imply that the docs
contains_key
are incorrect:The text was updated successfully, but these errors were encountered: