diff --git a/crates/rpc/rpc-eth-api/src/helpers/block.rs b/crates/rpc/rpc-eth-api/src/helpers/block.rs index 837006a970ef..0058ca021cfc 100644 --- a/crates/rpc/rpc-eth-api/src/helpers/block.rs +++ b/crates/rpc/rpc-eth-api/src/helpers/block.rs @@ -202,9 +202,10 @@ pub trait EthBlocks: LoadBlock { } .unwrap_or_default(); - let index = usize::from(index); - let uncle = - uncles.into_iter().nth(index).map(|header| uncle_block_from_header(header).into()); + let uncle = uncles + .into_iter() + .nth(index.into()) + .map(|header| uncle_block_from_header(header).into()); Ok(uncle) } }