fix: use saturated range (#2694)

This commit is contained in:
Matthias Seitz
2023-05-16 15:53:35 +02:00
committed by GitHub
parent ce50db0b1d
commit 5598ecb9c9

View File

@ -167,7 +167,9 @@ where
}
let mut result = Vec::with_capacity(count as usize);
for num in start..start + count {
let end = start.saturating_add(count);
for num in start..end {
let block = self
.client
.block(BlockHashOrNumber::Number(num))