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

merkledb -- codec nits/cleanup #1904

Merged
merged 6 commits into from
Aug 24, 2023
Merged

merkledb -- codec nits/cleanup #1904

merged 6 commits into from
Aug 24, 2023

Conversation

danlaine
Copy link

@danlaine danlaine commented Aug 23, 2023

Why this should be merged

Code cleanup

How this works

See comments below -- pretty self explanatory

How this was tested

Existing UT

@danlaine danlaine added cleanup Code quality improvement merkledb labels Aug 23, 2023
@danlaine danlaine self-assigned this Aug 23, 2023
@danlaine danlaine marked this pull request as ready for review August 23, 2023 20:07
Comment on lines +251 to +253
hasValue := maybeValue.HasValue()
c.encodeBool(dst, hasValue)
if hasValue {
Copy link
Author

Choose a reason for hiding this comment

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

I think "has value" is simpler than "doesn't not have a value"

}

func (c *codecImpl) encodeSerializedPath(s SerializedPath, dst *bytes.Buffer) {
func (c *codecImpl) encodeSerializedPath(dst *bytes.Buffer, s SerializedPath) {
Copy link
Author

Choose a reason for hiding this comment

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

switch parameter order for consistency

@danlaine danlaine merged commit b0da3f2 into dev Aug 24, 2023
16 checks passed
@danlaine danlaine deleted the codec-nits branch August 24, 2023 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Code quality improvement merkledb
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants