Closed loggerhead closed 8 years ago
For example, the following code is not support:
let cache: LruCache<String, String> = LruCache::with_capacity(1); cache.contains_key("foo");
Consider change the method declaration from
fn contains_key(&self, key: &Key) -> bool
to
fn contains_key<Q: ?Sized>(&self, k: &Q) -> bool where Key: Borrow<Q>, Q: Ord
I agree, also with #81! In general, we should get the API more in line with the standard library's maps. PRs are welcome. :slightly_smiling_face:
For example, the following code is not support:
Consider change the method declaration from
to