Skip to content

Conversation

@CorrM
Copy link
Contributor

@CorrM CorrM commented Feb 25, 2024

Add clone method to ContextWithHandlerCfg.

Pullrequest created for: #1126

So instead of

let cfg = ContextWithHandlerCfg::new(self.ctx_with_handler.context.clone(), self.ctx_with_handler.cfg.clone());
Evm::builder().with_context_with_handler_cfg(cfg).build();

Now:

Evm::builder().with_context_with_handler_cfg(self.ctx_with_handler.clone()).build();

`HandlerCfg` implements `Copy`, i prefer `.clone()` to be more redable but pass test is more important :)
@rakita rakita merged commit 02ae4e6 into bluealloy:main Feb 26, 2024
@github-actions github-actions bot mentioned this pull request Feb 26, 2024
fubuloubu pushed a commit to ApeWorX/revm that referenced this pull request Apr 11, 2024
* Add `clone` to `ContextWithHandlerCfg`

* Fix `clippy` error.

`HandlerCfg` implements `Copy`, i prefer `.clone()` to be more redable but pass test is more important :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants