From 7513bcbf09f13f1625b989d52c52087048d90a73 Mon Sep 17 00:00:00 2001 From: Antoine Poinsot Date: Wed, 12 Oct 2022 17:25:22 +0200 Subject: [PATCH] bitcoind: use and_then instead of map().flatten() --- src/bitcoin/d/mod.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/bitcoin/d/mod.rs b/src/bitcoin/d/mod.rs index 217dd957..a6f8ce48 100644 --- a/src/bitcoin/d/mod.rs +++ b/src/bitcoin/d/mod.rs @@ -767,8 +767,7 @@ impl From for GetTxRes { .map(|bt| bt as u32); let conflicting_txs = json .get("walletconflicts") - .map(|v| Json::as_array(&v)) - .flatten() + .and_then(Json::as_array) .map(|array| { array .into_iter()