Skip to content

Commit

Permalink
chore(storage): remove unnecessary check empty vec (#10671)
Browse files Browse the repository at this point in the history
  • Loading branch information
htiennv committed Sep 3, 2024
1 parent 80793cf commit 857f97e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions crates/storage/provider/src/writer/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ where
_: BlockNumber,
receipts: Vec<Option<Receipt>>,
) -> ProviderResult<()> {
if !receipts.is_empty() {
for (tx_idx, receipt) in receipts.into_iter().enumerate() {
if let Some(receipt) = receipt {
self.0.append(first_tx_index + tx_idx as u64, receipt)?;
}
for (tx_idx, receipt) in receipts.into_iter().enumerate() {
if let Some(receipt) = receipt {
self.0.append(first_tx_index + tx_idx as u64, receipt)?;
}
}
Ok(())
Expand Down

0 comments on commit 857f97e

Please sign in to comment.