hashes: Fix clippy warnings
Recently clippy was updated and now new warnings are generated for the `hashes` crate. Clippy emits 3 warnings of form: warning: this expression borrows a value the compiler would automatically borrow As suggested, remove the explicit borrow.
This commit is contained in:
parent
b9643bf3e9
commit
9674bf29fe
|
@ -124,19 +124,19 @@ impl Default for Hash {
|
||||||
|
|
||||||
impl PartialOrd for Hash {
|
impl PartialOrd for Hash {
|
||||||
fn partial_cmp(&self, other: &Hash) -> Option<cmp::Ordering> {
|
fn partial_cmp(&self, other: &Hash) -> Option<cmp::Ordering> {
|
||||||
(&self.0).partial_cmp(&other.0)
|
self.0.partial_cmp(&other.0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Ord for Hash {
|
impl Ord for Hash {
|
||||||
fn cmp(&self, other: &Hash) -> cmp::Ordering {
|
fn cmp(&self, other: &Hash) -> cmp::Ordering {
|
||||||
(&self.0).cmp(&other.0)
|
self.0.cmp(&other.0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl hash::Hash for Hash {
|
impl hash::Hash for Hash {
|
||||||
fn hash<H: hash::Hasher>(&self, state: &mut H) {
|
fn hash<H: hash::Hasher>(&self, state: &mut H) {
|
||||||
(&self.0).hash(state)
|
self.0.hash(state)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue