chore(storage): remove unnecessary check empty vec (#10671)

This commit is contained in:
Tien Nguyen
2024-09-03 16:03:11 +07:00
committed by GitHub
parent 80793cfe17
commit 857f97e3a3

View File

@@ -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(())