chore: clippy

This commit is contained in:
rvcas 2022-09-19 11:11:52 -04:00
parent f10e3836ad
commit 0ba8787b97
No known key found for this signature in database
GPG Key ID: C09B64E263F7D68C
1 changed files with 2 additions and 4 deletions

View File

@ -103,7 +103,7 @@ pub fn scripts_needed(
.as_ref() .as_ref()
.unwrap_or(&KeyValuePairs::Indef(vec![])) .unwrap_or(&KeyValuePairs::Indef(vec![]))
.iter() .iter()
.map(|(acnt, _)| { .filter_map(|(acnt, _)| {
let address = Address::from_bytes(acnt).unwrap(); let address = Address::from_bytes(acnt).unwrap();
if let Address::Stake(a) = address { if let Address::Stake(a) = address {
@ -115,7 +115,6 @@ pub fn scripts_needed(
None None
}) })
.flatten()
.collect::<AlonzoScriptsNeeded>(); .collect::<AlonzoScriptsNeeded>();
let mut cert = txb let mut cert = txb
@ -123,7 +122,7 @@ pub fn scripts_needed(
.clone() .clone()
.unwrap_or_default() .unwrap_or_default()
.iter() .iter()
.map(|cert| { .filter_map(|cert| {
// only Dereg and Deleg certs can require scripts // only Dereg and Deleg certs can require scripts
match cert { match cert {
Certificate::StakeDeregistration(StakeCredential::Scripthash(h)) => { Certificate::StakeDeregistration(StakeCredential::Scripthash(h)) => {
@ -135,7 +134,6 @@ pub fn scripts_needed(
_ => None, _ => None,
} }
}) })
.flatten()
.collect::<AlonzoScriptsNeeded>(); .collect::<AlonzoScriptsNeeded>();
let mut mint = txb let mut mint = txb