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

Buf write simplification #898

Merged
merged 1 commit into from Jun 21, 2023
Merged

Conversation

g-r-a-n-t
Copy link
Member

@g-r-a-n-t g-r-a-n-t commented Jun 17, 2023

What was wrong?

The buf write implementation seems unnecessarily complicated.

Currently we allocate the exact len in memory for the buffer and ensure via rewrite_slot that we do not modify data outside of the buf's allocated region.

This PR changes the buf implementation so that an extra 31 bytes is allocated for bufs. This eliminates the need for a function like rewrite_slot.

How was it fixed?

⌨️

To-Do

  • OPTIONAL: Update Spec if applicable
  • Add entry to the release notes (may forgo for trivial changes)
  • Clean up commit history

crates/library/std/src/buf.fe Outdated Show resolved Hide resolved
@g-r-a-n-t g-r-a-n-t merged commit c7015d1 into ethereum:master Jun 21, 2023
7 checks passed
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.

None yet

2 participants