Clear incorrect implementation of clone warning
Clippy emits: error: incorrect implementation of `clone` on a `Copy` type As suggested use `*self` instead of each individual field.
This commit is contained in:
parent
cdbd4be4b1
commit
e84ca292d9
|
@ -39,7 +39,7 @@ impl<T: Tag> Hash<T> {
|
||||||
|
|
||||||
impl<T: Tag> Copy for Hash<T> {}
|
impl<T: Tag> Copy for Hash<T> {}
|
||||||
impl<T: Tag> Clone for Hash<T> {
|
impl<T: Tag> Clone for Hash<T> {
|
||||||
fn clone(&self) -> Self { Hash(self.0, self.1) }
|
fn clone(&self) -> Self { *self }
|
||||||
}
|
}
|
||||||
impl<T: Tag> PartialEq for Hash<T> {
|
impl<T: Tag> PartialEq for Hash<T> {
|
||||||
fn eq(&self, other: &Hash<T>) -> bool { self.0 == other.0 }
|
fn eq(&self, other: &Hash<T>) -> bool { self.0 == other.0 }
|
||||||
|
|
Loading…
Reference in New Issue