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

Eliminate evm::buffer::Inner::Empty #259

Merged
merged 4 commits into from Jan 12, 2024

Conversation

mickvangelderen
Copy link

@mickvangelderen mickvangelderen commented Jan 12, 2024

The Empty variant was added when we had different memory allocators. Currently we can also represent the emptyness of the buffer trough the Inner::Owned variant since that holds a Vec which can be empty.

This commit replaces Inner::Empty with Inner::Owned(Vec::default()).

This change makes it so that future readers of the code do not need to worry about how Inner::Empty is different from Inner::Owned(Vec::default), and what Empty then represents exactly. This change is a pre-refactor required to improve how Buffer is used in the rest of the code base.

The `Empty` variant was added when we had different memory allocators.
Currently we can also represent the emptyness of the buffer trough the
`Inner::Owned` variant since that holds a `Vec` which can be empty.

This commit replaces `Inner::Empty` with `Inner::Owned(Vec::default())`.
@mickvangelderen mickvangelderen merged commit def4fdb into develop Jan 12, 2024
4 checks passed
@mickvangelderen mickvangelderen deleted the eliminate-buffer-inner-empty branch January 12, 2024 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants