-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
<Cache as Clone>
has overly-restrictive trait bounds
#131
Comments
Thank you for reporting the issue. As a short answer, I will remove
Here are longer answers:
|
Thank you for the detailed explanation. It looks like you actually removed all the bounds from the More generally it would be nice to remove bounds from methods where they aren't necessary. For example, all of the Removing unnecessary bounds from traits (like For an example of precedent, if you look at |
Yes, I did. In my previous comment, I meant I cannot remove these bounds (e.g.
Okay. I think I got your point. Thank you for explaining it. I will create a separate issue for removing unnecessary bounds from some methods and do it. I think I have done for |
The various
Cache
types deriveClone
, which means they requirewhere K: Clone, V: Clone, S: Clone
. This is overly restrictive. Since the underlyingBaseCache
on each type has no trait bounds on theirClone
impls, theCache
s don't need them either.Besides being annoying, this also means that the cache key needs to be cloneable in order to clone the cache, even though this is not otherwise a requirement for cache keys.
The text was updated successfully, but these errors were encountered: