diff --git a/src/lib.rs b/src/lib.rs index 7420eb1..cfd7955 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -86,10 +86,10 @@ pub trait Equivalent { fn equivalent(&self, key: &K) -> bool; } -impl Equivalent for Q +impl Equivalent for Q where - Q: Eq, - K: Borrow, + Q: ?Sized + Eq, + K: ?Sized + Borrow, { #[inline] fn equivalent(&self, key: &K) -> bool { @@ -108,10 +108,10 @@ pub trait Comparable: Equivalent { fn compare(&self, key: &K) -> Ordering; } -impl Comparable for Q +impl Comparable for Q where - Q: Ord, - K: Borrow, + Q: ?Sized + Ord, + K: ?Sized + Borrow, { #[inline] fn compare(&self, key: &K) -> Ordering {