-
Notifications
You must be signed in to change notification settings - Fork 93
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
Use self
instead of &self
during decompression
#824
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks correct to me. However, it is not obvious to me what the benefit of doing this are. What do we gain by taking ownership/moving the compressed value as opposed to reading it over a reference?
The only obvious improvement I can see is for PoliciesBits
where we skip a redundant dereferencing operation, but for UtxoId
and impl_substitutable_key
we need to create new references within the functions instead.
…move-value-during-decompression
It has more sense in the case of messages and coins(predicate data for example, where we just move vector instead of cloning it). |
Alright, makes sense. Thanks for clarifying! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
The base branch was changed.
…pression # Conflicts: # CHANGELOG.md # fuel-tx/src/transaction/policies.rs
Just move
self
during deserialization since in most cases we will do nothing with it.