Skip to content

Commit cb80742

Browse files
committed
chore: do not use SAFETY blocks, as its not unsafe code
1 parent d513b4d commit cb80742

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/db/alloy.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ impl<N: Network, P: Provider<N>> DatabaseAsyncRef for AlloyDb<N, P> {
8585
async fn block_hash_async_ref(&self, number: u64) -> Result<B256, Self::Error> {
8686
let block = self
8787
.provider
88-
// SAFETY: We know number <= u64::MAX, so we can safely convert it to u64
88+
// We know number <= u64::MAX, so we can safely convert it to u64
8989
.get_block_by_number(number.into())
9090
.await?;
91-
// SAFETY: If the number is given, the block is supposed to be finalized, so unwrapping is safe.
91+
// If the number is given, the block is supposed to be finalized, so unwrapping is safe.
9292
Ok(B256::new(*block.unwrap().header().hash()))
9393
}
9494

0 commit comments

Comments
 (0)