Skip to content

Commit 437bb51

Browse files
committed
make clippy happy
1 parent d5b9371 commit 437bb51

File tree

4 files changed

+12
-13
lines changed

4 files changed

+12
-13
lines changed

crates/audit/src/types.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,15 @@ impl BundleEvent {
121121
block_hash,
122122
..
123123
} => {
124-
format!("{}-{}", bundle_id, block_hash)
124+
format!("{bundle_id}-{block_hash}")
125125
}
126126
BundleEvent::FlashblockIncluded {
127127
bundle_id,
128128
block_number,
129129
flashblock_index,
130130
..
131131
} => {
132-
format!("{}-{}-{}", bundle_id, block_number, flashblock_index)
132+
format!("{bundle_id}-{block_number}-{flashblock_index}")
133133
}
134134
_ => {
135135
format!("{}-{}", self.bundle_id(), Uuid::new_v4())

crates/datastore/src/postgres.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -446,19 +446,20 @@ impl BundleDatastore for PostgresDatastore {
446446
match (row.latest_block_number, row.latest_block_hash) {
447447
(Some(block_number), Some(hash_str)) => {
448448
let hash = B256::from_hex(&hash_str)
449-
.map_err(|e| anyhow::anyhow!("Failed to parse latest block hash: {}", e))?;
449+
.map_err(|e| anyhow::anyhow!("Failed to parse latest block hash: {e}"))?;
450450
(block_number as u64, hash)
451451
}
452452
_ => return Ok(None),
453453
};
454454

455-
let latest_finalized_block_hash = if let Some(hash_str) = row.latest_finalized_block_hash {
456-
Some(B256::from_hex(&hash_str).map_err(|e| {
457-
anyhow::anyhow!("Failed to parse latest finalized block hash: {}", e)
458-
})?)
459-
} else {
460-
None
461-
};
455+
let latest_finalized_block_hash =
456+
if let Some(hash_str) = row.latest_finalized_block_hash {
457+
Some(B256::from_hex(&hash_str).map_err(|e| {
458+
anyhow::anyhow!("Failed to parse latest finalized block hash: {e}")
459+
})?)
460+
} else {
461+
None
462+
};
462463

463464
Ok(Some(BlockInfo {
464465
latest_block_number,

crates/ingress-rpc/src/service.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,6 @@ where
9494
.await?;
9595
validate_tx(account, &transaction, &data, &mut l1_block_info).await?;
9696

97-
// TODO: parallelize DB and mempool setup
98-
9997
let expiry_timestamp = SystemTime::now()
10098
.duration_since(UNIX_EPOCH)
10199
.unwrap()

crates/maintenance/src/job.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ impl<S: BundleDatastore, P: Provider<Optimism>, K: BundleEventPublisher> Mainten
6969
)))
7070
.full()
7171
.await?
72-
.ok_or_else(|| anyhow::anyhow!("Failed to get block {}", block_num))?;
72+
.ok_or_else(|| anyhow::anyhow!("Failed to get block {block_num}"))?;
7373

7474
self.on_new_block(block).await?;
7575
}

0 commit comments

Comments
 (0)