Skip to content

Commit c1efdd8

Browse files
authored
fix(lint): fix clippy lints (#864)
2 parents 859a306 + 88d504a commit c1efdd8

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

tycho-indexer/src/extractor/protocol_extractor.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ where
619619
.await;
620620
let (unknown_tokens, known_tokens) = new_token_addresses
621621
.into_iter()
622-
.zip(is_token_known.into_iter())
622+
.zip(is_token_known)
623623
.partition::<Vec<_>, _>(|(_, known)| !*known);
624624
let known_tokens = known_tokens
625625
.into_iter()
@@ -1727,17 +1727,17 @@ impl ExtractorGateway for ExtractorPgGateway {
17271727
tx_update
17281728
.balance_changes
17291729
.clone()
1730-
.into_iter()
1731-
.flat_map(|(_, tokens_balances)| tokens_balances.into_values()),
1730+
.into_values()
1731+
.flat_map(|tokens_balances| tokens_balances.into_values()),
17321732
);
17331733

17341734
// Map account balance changes
17351735
account_balance_changes.extend(
17361736
tx_update
17371737
.account_balance_changes
17381738
.clone()
1739-
.into_iter()
1740-
.flat_map(|(_, tokens_balances)| tokens_balances.into_values()),
1739+
.into_values()
1740+
.flat_map(|tokens_balances| tokens_balances.into_values()),
17411741
);
17421742

17431743
// Map new entrypoints

tycho-storage/src/postgres/contract.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,8 +514,8 @@ impl PostgresGateway {
514514
.collect();
515515
#[allow(clippy::mutable_key_type)]
516516
let accounts: HashSet<_> = slots
517-
.iter()
518-
.flat_map(|(_, contract_slots)| contract_slots.keys())
517+
.values()
518+
.flat_map(|contract_slots| contract_slots.keys())
519519
.collect();
520520
let account_ids: HashMap<Bytes, i64> = schema::account::table
521521
.filter(schema::account::address.eq_any(accounts))

tycho-storage/src/postgres/entry_point.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ impl PostgresGateway {
5353
.collect::<HashMap<_, _>>();
5454

5555
let new_entry_points = new_data
56-
.iter()
57-
.flat_map(|(_, ep)| {
56+
.values()
57+
.flat_map(|ep| {
5858
ep.iter()
5959
.map(|ep| NewEntryPoint {
6060
external_id: ep.external_id.clone(),
@@ -77,8 +77,8 @@ impl PostgresGateway {
7777
// Fetch entry points by their external_ids, we can't use .returning() on the insert above
7878
// because it doesn't return the ids on conflicts.
7979
let input_external_ids: Vec<EntryPointId> = new_data
80-
.iter()
81-
.flat_map(|(_, ep)| {
80+
.values()
81+
.flat_map(|ep| {
8282
ep.iter()
8383
.map(|ep| ep.external_id.clone())
8484
})

0 commit comments

Comments
 (0)