From 2afc9faa08a1f8c9c644eb43e9647205808dc7a3 Mon Sep 17 00:00:00 2001 From: Tobin Harding Date: Wed, 23 Dec 2020 13:45:39 +1100 Subject: [PATCH] Remove needles explicit reference Clippy emits warning: warning: needlessly taken reference of both operands Remove the explicit reference's as suggested. --- src/descriptor/policy.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/descriptor/policy.rs b/src/descriptor/policy.rs index 8929e085..7dbfda60 100644 --- a/src/descriptor/policy.rs +++ b/src/descriptor/policy.rs @@ -938,7 +938,7 @@ mod test { .unwrap(); assert!( - matches!(&policy.item, Signature(pk_or_f) if &pk_or_f.fingerprint.unwrap() == &fingerprint) + matches!(&policy.item, Signature(pk_or_f) if pk_or_f.fingerprint.unwrap() == fingerprint) ); assert!(matches!(&policy.contribution, Satisfaction::None)); @@ -953,7 +953,7 @@ mod test { .unwrap(); assert!( - matches!(&policy.item, Signature(pk_or_f) if &pk_or_f.fingerprint.unwrap() == &fingerprint) + matches!(&policy.item, Signature(pk_or_f) if pk_or_f.fingerprint.unwrap() == fingerprint) ); assert!( matches!(&policy.contribution, Satisfaction::Complete {condition} if condition.csv == None && condition.timelock == None) @@ -1039,8 +1039,8 @@ mod test { assert!( matches!(&policy.item, Multisig { keys, threshold } if threshold == &1 - && &keys[0].fingerprint.unwrap() == &fingerprint0 - && &keys[1].fingerprint.unwrap() == &fingerprint1) + && keys[0].fingerprint.unwrap() == fingerprint0 + && keys[1].fingerprint.unwrap() == fingerprint1) ); assert!( matches!(&policy.contribution, Satisfaction::PartialComplete { n, m, items, conditions, .. } if n == &2 @@ -1071,8 +1071,8 @@ mod test { assert!( matches!(&policy.item, Multisig { keys, threshold } if threshold == &2 - && &keys[0].fingerprint.unwrap() == &fingerprint0 - && &keys[1].fingerprint.unwrap() == &fingerprint1) + && keys[0].fingerprint.unwrap() == fingerprint0 + && keys[1].fingerprint.unwrap() == fingerprint1) ); assert!( @@ -1103,7 +1103,7 @@ mod test { .unwrap(); assert!( - matches!(&policy.item, Signature(pk_or_f) if &pk_or_f.fingerprint.unwrap() == &fingerprint) + matches!(&policy.item, Signature(pk_or_f) if pk_or_f.fingerprint.unwrap() == fingerprint) ); assert!(matches!(&policy.contribution, Satisfaction::None)); @@ -1119,7 +1119,7 @@ mod test { .unwrap(); assert!( - matches!(&policy.item, Signature(pk_or_f) if &pk_or_f.fingerprint.unwrap() == &fingerprint) + matches!(&policy.item, Signature(pk_or_f) if pk_or_f.fingerprint.unwrap() == fingerprint) ); assert!( matches!(&policy.contribution, Satisfaction::Complete {condition} if condition.csv == None && condition.timelock == None) @@ -1147,8 +1147,8 @@ mod test { assert!( matches!(&policy.item, Multisig { keys, threshold } if threshold == &1 - && &keys[0].fingerprint.unwrap() == &fingerprint0 - && &keys[1].fingerprint.unwrap() == &fingerprint1) + && keys[0].fingerprint.unwrap() == fingerprint0 + && keys[1].fingerprint.unwrap() == fingerprint1) ); assert!( matches!(&policy.contribution, Satisfaction::PartialComplete { n, m, items, conditions, .. } if n == &2