Skip to content

Commit 755b726

Browse files
committed
minor
1 parent ffb27a3 commit 755b726

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

webserver/src/handler/transaction.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,11 @@ pub async fn get_most_recent_transactions(
158158

159159
// Filter the corresponding inner txs to include only the matching inners in
160160
// the response
161-
let inner_futs = candidates
162-
.iter()
163-
.map(|tx| {
164-
state
165-
.transaction_service
166-
.get_inner_tx_by_wrapper_id(tx.id.to_string())
167-
})
168-
.collect::<Vec<_>>();
161+
let inner_futs = candidates.iter().map(|tx| {
162+
state
163+
.transaction_service
164+
.get_inner_tx_by_wrapper_id(tx.id.to_string())
165+
});
169166

170167
let inner_results = futures::future::join_all(inner_futs).await;
171168

webserver/src/repository/transaction.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -326,18 +326,17 @@ impl TransactionRepositoryTrait for TransactionRepository {
326326

327327
// Build `(kind in regular) AND ((sources IN tokens) OR (targets
328328
// IN tokens))`
329-
let regular_filter = inner_transactions::dsl::kind
330-
.eq_any(regular_kinds.clone())
331-
.and(
329+
let regular_filter =
330+
inner_transactions::dsl::kind.eq_any(regular_kinds).and(
332331
sources_token
333-
.eq_any(tokens.clone())
334-
.or(targets_token.eq_any(tokens.clone())),
332+
.eq_any(&tokens)
333+
.or(targets_token.eq_any(&tokens)),
335334
);
336335

337336
// Build `(kind in ibc_kinds) AND (ibc_account IN tokens)`
338337
let ibc_filter = inner_transactions::dsl::kind
339-
.eq_any(ibc_kinds.clone())
340-
.and(ibc_account.eq_any(tokens));
338+
.eq_any(ibc_kinds)
339+
.and(ibc_account.eq_any(&tokens));
341340

342341
let inner_by_token = inner_transactions::table
343342
.filter(

0 commit comments

Comments
 (0)