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

feat: add MaybeCancunPayloadFields::as_ref #692

Merged
merged 1 commit into from
May 6, 2024

Conversation

fgimenez
Copy link
Contributor

@fgimenez fgimenez commented May 6, 2024

Towards paradigmxyz/reth#7993

Motivation

When using MaybeCancunPayloadFields to check the existence of cancun fields, calling inner consumes self and forces to clone the container under some circumstances.

Solution

Add an as_ref that doesn't consume self and returns a reference to the inner fields.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@mattsse mattsse merged commit d3f53c0 into alloy-rs:main May 6, 2024
24 checks passed
ben186 pushed a commit to ben186/alloy that referenced this pull request Jul 27, 2024
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