Skip to content

Commit fa6c187

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

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/fork_ref_transact.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! This example demonstrates how to query storage slots of a contract, using
2-
//! [`AlloyDB`].
2+
//! [`AlloyDb`].
33
44
use alloy::{
55
eips::BlockId,

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)