From e303bf7f415d453dfa264e6acc7b584a785ff384 Mon Sep 17 00:00:00 2001 From: Mononaut Date: Sun, 6 Aug 2023 15:02:14 +0900 Subject: [PATCH] remove unnecessary scope --- src/rest.rs | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/rest.rs b/src/rest.rs index 51a77323..172139f6 100644 --- a/src/rest.rs +++ b/src/rest.rs @@ -1015,17 +1015,14 @@ fn handle_request( .collect::, _>>() { Ok(txids) => { - let txs: Vec<(Transaction, Option)> = { - txids - .iter() - .filter_map(|txid| { - query - .lookup_txn(txid) - .map(|tx| (tx, query.chain().tx_confirming_block(txid))) - }) - .collect() - }; - + let txs: Vec<(Transaction, Option)> = txids + .iter() + .filter_map(|txid| { + query + .lookup_txn(txid) + .map(|tx| (tx, query.chain().tx_confirming_block(txid))) + }) + .collect(); json_response(prepare_txs(txs, query, config), 0) } Err(err) => http_message(StatusCode::BAD_REQUEST, err.to_string(), 0),