Remove redundant borrows
Clippy emits: warning: this expression borrows a reference As suggested remove the borrows from the front of vars that are already references.
This commit is contained in:
@@ -128,11 +128,11 @@ impl IntoWalletDescriptor for (ExtendedDescriptor, KeyMap) {
|
||||
let (pk, _, networks) = if self.0.is_witness() {
|
||||
let desciptor_key: DescriptorKey<miniscript::Segwitv0> =
|
||||
pk.clone().into_descriptor_key()?;
|
||||
desciptor_key.extract(&secp)?
|
||||
desciptor_key.extract(secp)?
|
||||
} else {
|
||||
let desciptor_key: DescriptorKey<miniscript::Legacy> =
|
||||
pk.clone().into_descriptor_key()?;
|
||||
desciptor_key.extract(&secp)?
|
||||
desciptor_key.extract(secp)?
|
||||
};
|
||||
|
||||
if networks.contains(&network) {
|
||||
|
||||
@@ -336,7 +336,7 @@ impl Satisfaction {
|
||||
items.push(inner_index);
|
||||
let conditions_set = other_conditions
|
||||
.values()
|
||||
.fold(HashSet::new(), |set, i| set.union(&i).cloned().collect());
|
||||
.fold(HashSet::new(), |set, i| set.union(i).cloned().collect());
|
||||
conditions.insert(inner_index, conditions_set);
|
||||
}
|
||||
}
|
||||
@@ -1031,8 +1031,8 @@ mod test {
|
||||
) -> (DescriptorKey<Ctx>, DescriptorKey<Ctx>, Fingerprint) {
|
||||
let path = bip32::DerivationPath::from_str(path).unwrap();
|
||||
let tprv = bip32::ExtendedPrivKey::from_str(tprv).unwrap();
|
||||
let tpub = bip32::ExtendedPubKey::from_private(&secp, &tprv);
|
||||
let fingerprint = tprv.fingerprint(&secp);
|
||||
let tpub = bip32::ExtendedPubKey::from_private(secp, &tprv);
|
||||
let fingerprint = tprv.fingerprint(secp);
|
||||
let prvkey = (tprv, path.clone()).into_descriptor_key().unwrap();
|
||||
let pubkey = (tpub, path).into_descriptor_key().unwrap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user