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:
Tobin C. Harding 2022-11-08 09:00:56 +11:00
parent b9643bf3e9
commit 9674bf29fe
1 changed files with 3 additions and 3 deletions

View File

@ -124,19 +124,19 @@ impl Default for Hash {
impl PartialOrd for Hash {
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 {
fn cmp(&self, other: &Hash) -> cmp::Ordering {
(&self.0).cmp(&other.0)
self.0.cmp(&other.0)
}
}
impl hash::Hash for Hash {
fn hash<H: hash::Hasher>(&self, state: &mut H) {
(&self.0).hash(state)
self.0.hash(state)
}
}