Skip to content

Commit b069239

Browse files
committed
Take self by value
Clippy emits: warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value The method in question is private, change to take `self` by value. Requires no other changes.
1 parent b0cd8c1 commit b069239

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/interpreter/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ enum BitcoinKey {
103103
}
104104

105105
impl BitcoinKey {
106-
fn to_pubkeyhash(&self, sig_type: SigType) -> hash160::Hash {
106+
fn to_pubkeyhash(self, sig_type: SigType) -> hash160::Hash {
107107
match self {
108108
BitcoinKey::Fullkey(pk) => pk.to_pubkeyhash(sig_type),
109109
BitcoinKey::XOnlyPublicKey(pk) => pk.to_pubkeyhash(sig_type),

0 commit comments

Comments
 (0)