Use .flatten() instead of .filter_map(|x| x), clippy warning

https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_identity
This commit is contained in:
Steve Myers 2021-04-08 13:37:59 -07:00
parent 5f873ae500
commit e37680af96
No known key found for this signature in database
GPG Key ID: 8105A46B22C2D051

View File

@ -870,7 +870,7 @@ impl<Ctx: ScriptContext> ExtractPolicy for Miniscript<DescriptorPublicKey, Ctx>
.map(|n| n.extract_policy(signers, secp)) .map(|n| n.extract_policy(signers, secp))
.collect::<Result<Vec<_>, _>>()? .collect::<Result<Vec<_>, _>>()?
.into_iter() .into_iter()
.filter_map(|x| x) .flatten()
.collect(); .collect();
if mapped.len() < nodes.len() { if mapped.len() < nodes.len() {