Skip to content

Commit 45eb69d

Browse files
committed
Merge #499: Take self by value
b069239 Take self by value (Tobin C. Harding) Pull request description: 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. (Should have been part of the trivial clippy fixes :) ACKs for top commit: apoelstra: ACK b069239 Tree-SHA512: ff15ea9818323f799a917d3506454341d296d96c8be7e36606f7199e351c5843a17e43f1fd736bbef25e2916d5be15853643a61331cca5fc6962be7205c201fb
2 parents e267c78 + b069239 commit 45eb69d

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
@@ -92,7 +92,7 @@ enum BitcoinKey {
9292
}
9393

9494
impl BitcoinKey {
95-
fn to_pubkeyhash(&self, sig_type: SigType) -> hash160::Hash {
95+
fn to_pubkeyhash(self, sig_type: SigType) -> hash160::Hash {
9696
match self {
9797
BitcoinKey::Fullkey(pk) => pk.to_pubkeyhash(sig_type),
9898
BitcoinKey::XOnlyPublicKey(pk) => pk.to_pubkeyhash(sig_type),

0 commit comments

Comments
 (0)