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

refactor(e2store): refactor e2store utils #1145

Merged
merged 2 commits into from
Feb 8, 2024

Conversation

ogenev
Copy link
Member

@ogenev ogenev commented Feb 7, 2024

What was wrong?

Converting bytes to rust types and rust types to bytes is common as serializing and deserializing.
Even if we don't use the serde framework for deserializing/serializing Era files (at this stage), I think it is nice if we don't deviate much from the common concepts.

How was it fixed?

  • rename File to E2storeFIle
  • Reading from a byte slice is confusing with reading into a buffer which is typical to Readers. To remove this confusion, I renamed read to deserialize because this is what we are trying to do here: deserialize from a byte slice into a type.
  • To keep consistent with the above, I renamed encode to serialize.

@ogenev ogenev marked this pull request as ready for review February 7, 2024 10:36
@ogenev ogenev self-assigned this Feb 7, 2024
Copy link
Collaborator

@njgheorghita njgheorghita left a comment

Choose a reason for hiding this comment

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

🚢

@ogenev ogenev merged commit 0c7e22b into ethereum:master Feb 8, 2024
8 checks passed
@ogenev ogenev deleted the e2store-refactor branch February 8, 2024 08:02
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.

3 participants