From: DarthBenro008 Date: Thu, 15 Jul 2021 08:21:06 +0000 (+0530) Subject: fix: use flatten instead of filter_map() X-Git-Tag: v0.3.0~33 X-Git-Url: http://internal-gitweb-vhost/script/%22https:/enum.HexToArrayError.html?a=commitdiff_plain;h=c33f654d0340f2e684ffe511afa8b221882817bd;p=bdk-cli fix: use flatten instead of filter_map() Signed-off-by: DarthBenro008 --- diff --git a/.github/workflows/cont_integration.yml b/.github/workflows/cont_integration.yml index 19e9fe6..c0644c2 100644 --- a/.github/workflows/cont_integration.yml +++ b/.github/workflows/cont_integration.yml @@ -41,7 +41,7 @@ jobs: override: true components: rustfmt, clippy - name: Build - run: cargo build --features ${{ matrix.features }} --no-default-features + run: cargo build --features ${{ matrix.features }} --no-default-features --locked - name: Clippy run: cargo clippy -- -D warnings - name: Test diff --git a/src/lib.rs b/src/lib.rs index 872cd9e..7a3e551 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -750,7 +750,7 @@ where internal_policy.map(|p| (p, KeychainKind::Internal)), ]; - for (policy, keychain) in policies.into_iter().filter_map(|x| x) { + for (policy, keychain) in policies.into_iter().flatten() { let policy = serde_json::from_str::>>(&policy) .map_err(|s| Error::Generic(s.to_string()))?; tx_builder.policy_path(policy, keychain);