Skip to content
This repository was archived by the owner on Nov 30, 2022. It is now read-only.

Commit ec356e4

Browse files
committed
Merge #187: Remove unnecessary borrow
9815a4c Remove unnecessary borrow (Tobin C. Harding) Pull request description: Clippy emits various errors of form: error: this expression borrows a value the compiler would automatically borrow As suggested, remove the unnecessary borrow. FTR, this error shows up because of a clippy update (I believe). ACKs for top commit: apoelstra: ACK 9815a4c Tree-SHA512: 6f8335f7f045a23e0327a743fa0e9ca41774f8062cca9f9599742f9201acf548d38f1d206b6a8991390c75d14e0405dbeb625a6cb8474e0ada3e7292ca486837
2 parents da41d65 + 9815a4c commit ec356e4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/sha512.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,19 +124,19 @@ impl Default for Hash {
124124

125125
impl PartialOrd for Hash {
126126
fn partial_cmp(&self, other: &Hash) -> Option<cmp::Ordering> {
127-
(&self.0).partial_cmp(&other.0)
127+
self.0.partial_cmp(&other.0)
128128
}
129129
}
130130

131131
impl Ord for Hash {
132132
fn cmp(&self, other: &Hash) -> cmp::Ordering {
133-
(&self.0).cmp(&other.0)
133+
self.0.cmp(&other.0)
134134
}
135135
}
136136

137137
impl hash::Hash for Hash {
138138
fn hash<H: hash::Hasher>(&self, state: &mut H) {
139-
(&self.0).hash(state)
139+
self.0.hash(state)
140140
}
141141
}
142142

0 commit comments

Comments
 (0)