Skip to content

Commit 9135d9c

Browse files
committed
Use consistent style for Equivalent and Comparable too
1 parent 9cde2a4 commit 9135d9c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ pub trait Equivalent<K: ?Sized> {
8686
fn equivalent(&self, key: &K) -> bool;
8787
}
8888

89-
impl<Q: ?Sized, K: ?Sized> Equivalent<K> for Q
89+
impl<Q, K> Equivalent<K> for Q
9090
where
91-
Q: Eq,
92-
K: Borrow<Q>,
91+
Q: ?Sized + Eq,
92+
K: ?Sized + Borrow<Q>,
9393
{
9494
#[inline]
9595
fn equivalent(&self, key: &K) -> bool {
@@ -108,10 +108,10 @@ pub trait Comparable<K: ?Sized>: Equivalent<K> {
108108
fn compare(&self, key: &K) -> Ordering;
109109
}
110110

111-
impl<Q: ?Sized, K: ?Sized> Comparable<K> for Q
111+
impl<Q, K> Comparable<K> for Q
112112
where
113-
Q: Ord,
114-
K: Borrow<Q>,
113+
Q: ?Sized + Ord,
114+
K: ?Sized + Borrow<Q>,
115115
{
116116
#[inline]
117117
fn compare(&self, key: &K) -> Ordering {

0 commit comments

Comments
 (0)