refactor(identity): follow naming conventions for conversion methods#3775
refactor(identity): follow naming conventions for conversion methods#3775mergify[bot] merged 47 commits intolibp2p:masterfrom
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.
thomaseizinger
left a comment
There was a problem hiding this comment.
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. |
thomaseizinger
left a comment
There was a problem hiding this comment.
Nicely done, only one more things!
thomaseizinger
left a comment
There was a problem hiding this comment.
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.
mxinden
left a comment
There was a problem hiding this comment.
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