Skip to content
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

Add clone method to ContextWithHandlerCfg #1127

Merged
merged 2 commits into from
Feb 26, 2024
Merged

Add clone method to ContextWithHandlerCfg #1127

merged 2 commits into from
Feb 26, 2024

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
25 checks passed
@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