-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: remove/allow panics, expects and unwraps #1933
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
PR Type
Enhancement, Bug fix
Description
expect
andpanic
calls with more robust error handling mechanisms usingResult
,ok_or_else
, andanyhow!
.#[allow(clippy::expect_used)]
,#[allow(clippy::unwrap_used)]
, and#[allow(clippy::panic)]
attributes to specific functions and modules where these operations are deemed necessary or safe.parse_revm_execution
andparse_revm_state
functions in the EVM executor to returnResult
types for better error propagation.anyhow::Error
for more informative error messages.panic!
call withtodo!()
in theAddress
conversion fromNameOrAddress
.Changes walkthrough 📝
9 files
build.rs
Allow specific clippy lints in build script
build.rs
panic
postgres.rs
Allow panic lint in postgres module
src/eth/external_rpc/postgres.rs
importer.rs
Allow expect usage in block fetching
src/eth/follower/importer/importer.rs
function
miner.rs
Allow expect usage in miner ticker
src/eth/miner/miner.rs
interval_miner_ticker module
external_block.rs
Allow expect usage in external block methods
src/eth/primitives/external_block.rs
methods
external_receipt.rs
Allow expect usage in external receipt methods
src/eth/primitives/external_receipt.rs
and block_hash methods
ext.rs
Allow expect usage in extension traits
src/ext.rs
implementations
globals.rs
Allow expect usage in global services initialization
src/globals.rs
implementation
kafka.rs
Allow expect usage in Kafka connector creation
src/infra/kafka/kafka.rs
KafkaConnector::new method
4 files
evm.rs
Improve error handling in EVM execution parsing
src/eth/executor/evm.rs
execution.rs
Improve error handling in execution primitives
src/eth/primitives/execution.rs
log_mined.rs
Improve error handling in log conversion
src/eth/primitives/log_mined.rs
handling in TryFrom implementation
inmemory.rs
Enhance error handling in temporary storage
src/eth/storage/temporary/inmemory.rs
in TemporaryStorage implementation
1 files
address.rs
Replace panic with todo in address conversion
src/eth/primitives/address.rs