-
Notifications
You must be signed in to change notification settings - Fork 957
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(identity): follow naming conventions for conversion methods #3775
Conversation
Unreleased patch version 0.43.1 bumped. Added entry for PR 3606: Deriving 'Clone' for 'mdns::Event'
New unreleased minor version 0.44.0.
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
Unsynced co-authered change.
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.
Very nicely done, only a few nits!
Also, can you add a changelog entry to libp2p-identity
please and bump the patch version in the manifest of libp2p-identity
?
…libp2p into rename-identity
I've intentionally kept |
Yes, the lockfile needs to be up to date. |
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.
Nicely done, only one more things!
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.
This is ready for merge. We are just missing some version bumps to point to the correct version of libp2p-identity
.
@mxinden We are renaming several functions to be consistent with Rust's naming guidelines. Unfortunately, there is no clippy lint for this.
…libp2p into rename-identity
Awesome, thank you for sending this PR! |
This PR renames some method names that don't follow Rust naming conventions or behave differently from what the name suggests: - Enforce "try" prefix on all methods that return `Result`. - Enforce "encode" method name for methods that return encoded bytes. - Enforce "to_bytes" method name for methods that return raw bytes. - Enforce "decode" method name for methods that convert encoded key. - Enforce "from_bytes" method name for methods that convert raw bytes. Pull-Request: libp2p#3775.
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.
Sorry for the late review here. Great work @drHuangMHT!
Description
This PR renames some method names that don't follow Rust naming conventions or behave differently from what the name suggests:
Result
.Notes & open questions
Some method are intentionally left out to prevent conflict with #3681.
Base branch is contaminated by #3621.Change checklist