Skip to content

Commit

Permalink
remove unnecessary scope
Browse files Browse the repository at this point in the history
  • Loading branch information
mononaut committed Aug 6, 2023
1 parent 6c4e12b commit e303bf7
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions src/rest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1015,17 +1015,14 @@ fn handle_request(
.collect::<Result<Vec<Txid>, _>>()
{
Ok(txids) => {
let txs: Vec<(Transaction, Option<BlockId>)> = {
txids
.iter()
.filter_map(|txid| {
query
.lookup_txn(txid)
.map(|tx| (tx, query.chain().tx_confirming_block(txid)))
})
.collect()
};

let txs: Vec<(Transaction, Option<BlockId>)> = 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),
Expand Down

0 comments on commit e303bf7

Please sign in to comment.