We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Equivalent
Comparable
1 parent 45469ec commit 3df3fa7Copy full SHA for 3df3fa7
src/lib.rs
@@ -86,10 +86,10 @@ pub trait Equivalent<K: ?Sized> {
86
fn equivalent(&self, key: &K) -> bool;
87
}
88
89
-impl<Q: ?Sized, K: ?Sized> Equivalent<K> for Q
+impl<Q, K> Equivalent<K> for Q
90
where
91
- Q: Eq,
92
- K: Borrow<Q>,
+ Q: ?Sized + Eq,
+ K: ?Sized + Borrow<Q>,
93
{
94
#[inline]
95
fn equivalent(&self, key: &K) -> bool {
@@ -108,10 +108,10 @@ pub trait Comparable<K: ?Sized>: Equivalent<K> {
108
fn compare(&self, key: &K) -> Ordering;
109
110
111
-impl<Q: ?Sized, K: ?Sized> Comparable<K> for Q
+impl<Q, K> Comparable<K> for Q
112
113
- Q: Ord,
114
+ Q: ?Sized + Ord,
115
116
117
fn compare(&self, key: &K) -> Ordering {
0 commit comments