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: Remove initializers from Memory trait #343

Merged

Conversation

xxuejie
Copy link
Collaborator

@xxuejie xxuejie commented May 26, 2023

Different memory trait impls might require different ways of initializing,what's more, having initializers in Memory trait would prevent us from writing Box<dyn Memory<u64>>. What we really need here, is a reset memory function. This changes uses reset_memory to replace initializers in Memory trait.

Different memory trait impls might require different ways of
initializing,what's more, having initializers in Memory trait
would prevent us from writing `Box<dyn Memory<u64>>`. What we really
need here, is a reset memory function. This changes uses
`reset_memory` to replace initializers in Memory trait.
@xxuejie xxuejie requested a review from mohanson May 26, 2023 00:14
Copy link
Collaborator

@mohanson mohanson left a comment

Choose a reason for hiding this comment

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

LGTM

@xxuejie xxuejie merged commit d8cae8d into nervosnetwork:develop May 26, 2023
@xxuejie xxuejie deleted the remove-initializers-from-memory-trait branch May 26, 2023 03:25
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