forked from n0-computer/iroh
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(iroh-net)!: Do not use &NodeId in APIs as this is Copy (n0-c…
…omputer#2363) ## Description Some of our APIs take NodeId by reference, some by value. NodeId itself however is Copy and takes 32 bytes. I think it is more consistent and rusty to pass this by value and use the Copy semantics. Additionally this renames a few more types from PublicKey to NodeId to keep in line with our convention of using NodeId when used as identifier rather than cryptography. I believe rust-analyser might be inserting PublicKey by itself which is unfortunate. QuicMappedAddr and IpPort are also a Copy types and get the same treatment. ## Breaking Changes - Endpoint::conn_type_stream takes NodeId by value instead of by reference. ## Notes & open questions <!-- Any notes, remarks or open questions you have to make about the PR. --> ## Change checklist - [x] Self-review. - ~~[ ] Documentation updates if relevant.~~ - ~~[ ] Tests if relevant.~~ - [x] All breaking changes documented.
- Loading branch information
Showing
5 changed files
with
51 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters