From c33f654d0340f2e684ffe511afa8b221882817bd Mon Sep 17 00:00:00 2001 From: DarthBenro008 Date: Thu, 15 Jul 2021 13:51:06 +0530 Subject: [PATCH] fix: use flatten instead of filter_map() Signed-off-by: DarthBenro008 --- .github/workflows/cont_integration.yml | 2 +- src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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); -- 2.49.0