lint: warn on default_trait_access #1536
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Type
enhancement, bug fix
Description
clippy::default_trait_access
lint in the consensus module.Default::default()
with specific type defaults in multiple modules (evm.rs
,block_header.rs
,inmemory_permanent.rs
,inmemory_temporary.rs
).HashMap
import inevm.rs
.Default::default()
toNone
inread_slot
method ofinmemory_permanent.rs
.default_trait_access
to Clippy lints inCargo.toml
.Changes walkthrough 📝
mod.rs
Allow `default_trait_access` lint in consensus module
src/eth/consensus/mod.rs
clippy::default_trait_access
to allowed lints.evm.rs
Use specific type defaults in EVM executor
src/eth/executor/evm.rs
Default::default()
with specific type defaults.HashMap
import.block_header.rs
Use specific type defaults in block header
src/eth/primitives/block_header.rs
Default::default()
with specific type defaults.EthersBytes
import.inmemory_permanent.rs
Use specific type defaults in in-memory permanent storage
src/eth/storage/inmemory/inmemory_permanent.rs
Default::default()
with specific type defaults.Default::default()
toNone
inread_slot
.inmemory_temporary.rs
Use specific type defaults in in-memory temporary storage
src/eth/storage/inmemory/inmemory_temporary.rs
Default::default()
with specific type defaults.rocks_state.rs
Use `Mutex::default()` in RocksDB storage state
src/eth/storage/rocks/rocks_state.rs
Default::default()
withMutex::default()
.Cargo.toml
Add `default_trait_access` to Clippy lints
Cargo.toml
default_trait_access
to Clippy lints.