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

Implement Borrow<str> for KeyRef<std::string::String>? #117

Closed
pourplusquoi opened this issue Oct 4, 2021 · 2 comments
Closed

Implement Borrow<str> for KeyRef<std::string::String>? #117

pourplusquoi opened this issue Oct 4, 2021 · 2 comments

Comments

@pourplusquoi
Copy link

pourplusquoi commented Oct 4, 2021

Use case:

let mut lru = LruCache::<String, String>::new(16);
let _ = lru.get("foo");

The compiler complains: the trait bound KeyRef<std::string::String>: Borrow<str> is not satisfied.

I'm using lru = "0.6"

@jeromefroe
Copy link
Owner

Hi @pourplusquoi! Can you try version 0.7 (I just published it)? It includes the changes in #115 that I think should address your issue.

@pourplusquoi
Copy link
Author

Hi @pourplusquoi! Can you try version 0.7 (I just published it)? It includes the changes in #115 that I think should address your issue.

Hi @jeromefroe, thanks for your reply! It works on version 0.7

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

No branches or pull requests

2 participants