From 9674bf29fe996a1f4c73c8a78193674214f9733c Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Tue, 8 Nov 2022 09:00:56 +1100 Subject: [PATCH] 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. --- hashes/src/sha512.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hashes/src/sha512.rs b/hashes/src/sha512.rs index 8498c993..98e18acb 100644 --- a/hashes/src/sha512.rs +++ b/hashes/src/sha512.rs @@ -124,19 +124,19 @@ impl Default for Hash { impl PartialOrd for Hash { fn partial_cmp(&self, other: &Hash) -> Option { - (&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(&self, state: &mut H) { - (&self.0).hash(state) + self.0.hash(state) } }