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

pref: improve decode_raw #34

Merged
merged 3 commits into from
Jan 16, 2025
Merged

pref: improve decode_raw #34

merged 3 commits into from
Jan 16, 2025

Conversation

Wollac
Copy link
Contributor

@Wollac Wollac commented Jan 16, 2025

This PR improves the decode_raw method:

  • By letting Header::decode advance the payload, the special case of no RLP header does not need to be handled explicitly.
  • Using advance_unchecked results in a small performance improvement because the payload length has already been validated.
  • Minor improvements to the documentation

Copy link
Member

@DaniPopes DaniPopes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

CHANGELOG.md Show resolved Hide resolved
@Wollac Wollac requested a review from DaniPopes January 16, 2025 13:32
@DaniPopes DaniPopes merged commit c15b2d3 into alloy-rs:main Jan 16, 2025
18 checks passed
@Wollac Wollac deleted the perf/decode-raw branch January 16, 2025 14:45
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