Skip to content

Commit adedee6

Browse files
committed
derive(Clone, PartialEq) for HashValue
1 parent 36eeeab commit adedee6

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

src/lib.rs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ pub use set::IndexSet;
9797

9898
/// Hash value newtype. Not larger than usize, since anything larger
9999
/// isn't used for selecting position anyway.
100-
#[derive(Copy, Debug)]
100+
#[derive(Clone, Copy, Debug, PartialEq)]
101101
struct HashValue(usize);
102102

103103
impl HashValue {
@@ -107,19 +107,6 @@ impl HashValue {
107107
}
108108
}
109109

110-
impl Clone for HashValue {
111-
#[inline]
112-
fn clone(&self) -> Self {
113-
*self
114-
}
115-
}
116-
impl PartialEq for HashValue {
117-
#[inline]
118-
fn eq(&self, rhs: &Self) -> bool {
119-
self.0 == rhs.0
120-
}
121-
}
122-
123110
#[derive(Copy, Clone, Debug)]
124111
struct Bucket<K, V> {
125112
hash: HashValue,

0 commit comments

Comments
 (0)